#include<stdio.h>
    
int main(){
    
int h1,h2,tai,tcnt,hcnt;

tcnt =0;
hcnt=0;
  
while(scanf("%d,%d,%d",&h1,&h2,&tai)!=EOF){
  if(h1*h1+h2*h2=tai){tcnt=tcnt+1;}
  else if(h1==h2){hcnt=hcnt+1;}

   printf("%d\n%d\n ",tcnt,hcnt);

}
    
    return 0;
}