#include<iostream>
using namespace std;
int main(void)
{
int a,b,c;
int count1=0,count2=0;
char tmp;
while(cin>>a>>tmp>>b>>tmp>>c)
{
if(a*a+b*b==c*c)count1++;
else if(a==b)count2++;

}
cout<<count1<<endl;
cout<<count2<<endl;
return 0;
}