#include <iostream>
using namespace std;

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