#include <stdio.h>
  int main(){
   int a,b,c;
   int num1=0,num2=0;
   while(scanf("%d,%d,%d",&a,&b,&c) !=EOF){
          if(a==b) num2++;
          else if(a*a+b*b==c*c) num1++;
}
printf("%d\n%d\n",num1,num2);
return 0;
}