#include<iostream>
using namespace std;
int main(){

  int a,b,c;
  char x;
  int t=0,h=0;

  while(cin>>a>>x>>b>>x>>c){
    if(a*a+b*b==c*c)
      t++;
    if(a==b)
      h++;
  }
  cout << t << endl << h << endl;
}