#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
  int a,b,c;
  int rect,square;
  rect = square = 0;
  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
    if((c*c) == (a*a) + (b*b))rect++;
    if(a == b)square++;
  }
  cout << rect << endl;
  cout << square << endl;
}