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

int main()
{
	int a,b,c;
	char d;
	int l=0,h=0;

	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		if(a*a + b*b == c*c){
			++l;
			if(a == b)
				++h;
		}
	}
	
	cout << l << endl << h << endl;
	
	return 0;
}