#include<iostream>

using namespace std;

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