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

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

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

	cout << t << endl << h << endl;
	return 0;
}