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