#include<iostream>
using namespace std;
int main(void)
{
int a,b,c;
while(cin>>a>>b>>c)
{
int x[3];
int count1=0,count2=0;
if(a*a+b*b==c*c)count1++;
else if(a==b)count2++;
cout<<count1<<endl;
cout<<count2<<endl;
}
return 0;
}