#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int ans_a = 0, ans_b = 0;
  for(;;){
    int a,b,c;
    if(scanf("%d,%d,%d",&a,&b,&c) == EOF){break;}
    if(a*a+b*b == c*c){ans_a++;}
    if(a == b){ans_b++;}
  }
  cout <<ans_a<<endl<<ans_b<<endl;
  return 0;
}