#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int a,b,c;
	char d;
	int l=0,h=0;
	while(cin >> a >> d >> b >> d >> c){
		if(pow(a,2) + pow(b,2) == pow(c,2)){
			if(a == b)
				if(a != c)
					++h;
			else
				++l;
		}
	}
	
	cout << l << endl << h << endl;
	
	return 0;
}