#include <iostream>

using namespace std;


int main(void){
   int a,b,c,s=0,r=0;
   char ch;
   
   while(cin>>a>>ch>>b>>ch>>c){
       if(a*a + b*b == c*c){
           s++;
       }
       if(a == b){
           r++;
       }
   }
   cout<<s<<endl<<r<<endl;
   
   return 0;
}

