#define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>

typedef long long ll;
using namespace std;

typedef pair<int,int> P;

int main()
{
	string str;
	int rect_num=0;
	int diam_num=0;
	while(getline(cin,str,',')){
		string str2;
		getline(cin,str2,',');

		string str3;
		getline(cin,str3);

		int edge1 = atoi(str.c_str());
		int edge2 = atoi(str2.c_str());
		int diag = atoi(str3.c_str());

		if(edge1 + edge2 <= diag || (edge1 == edge2 && edge1 == diag)) continue;

		if(edge1 == edge2){
			diam_num++;
		}
		else{
			rect_num++;
		}
	}

	printf("%d\n%d\n",rect_num,diam_num);
}