1046 划拳
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int a, b, c, d;
bool flag1 = false, flag2 = false;
int count1=0,count2=0;
for (int i = 0; i < N; i++)
{
cin >> a >> b >> c >> d; //甲喊 甲划 乙喊 乙划, 划=喊+喊
if (b == a + c)
flag1 = true;
else
flag1 = false;
if (d == a + c)
flag2 = true;
else
flag2 = false;
if(flag1==flag2)
continue;
else if(flag1&&!flag2)
count2++;
else if(!flag1&&flag2)
count1++;
}
cout<<count1<<" "<<count2;
}