#include <iostream>
using namespace std;

int main()
{
	int r = 0;
	int d = 0;
	int a,b,c;
	char t;
	while ( cin>>a>>t>>b>>t>>c )
	{
		if ( a*a+b*b==c*c )
			r++;
		if ( a==b )
			d++;
	}
	cout << r << endl;
	cout << d << endl;
	return 0;
}