#include <iostream>

using namespace std;

int main()
{
	int a, b, c, ty = 0, hi = 0;
	char d;

	while(cin >> a >> d >> b >> d >> c){
		if((a*a + b*b) == c*c)
			ty++;
		if(a == b)
			hi++;
	}

	cout << ty << endl << hi << endl;

	return 0;
}