#include <stdio.h>

int main(){

   int a,b,c,n1,n2;
   n1=0;
   n2=0;
   while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
      if(c*c=a*a+b*b)
         n1++;
      if(a==b)
         n2++;
   }
   printf("%d\n%d\n",n1,n2);
   return 0;
}