#include <stdio.h> #include <stdlib.h> int main() { int N; int arr[100][4]; int jia=0, yi=0; scanf("%d", &N); for(int i=0; i<N; i++) { for(int j=0; j<4; j++) { scanf("%d", &arr[i][j]); } } for(int k=0; k<N; k++) { if(arr[k][0]+arr[k][2] == arr[k][1] && arr[k][0]+arr[k][2] != arr[k][3]) { yi++; } if(arr[k][0]+arr[k][2] != arr[k][1] && arr[k][0]+arr[k][2] == arr[k][3]) { jia++; } } printf("%d %d", jia, yi); return 0; }