#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int a,b,c;
  int t=0,h=0;
  while(scanf("%d,%d,%d",&a,&b,&c)+1){
    // if(a==0)break;
    if(a==b)h++;
    if(c*c==a*a+b*b)t++;
  }
  cout<<t<<endl<<h<<endl;
}
    