#include <iostream>
#include <cstdio>
using namespace std;

int main(){
  int a,b,c;
  int lozenges = 0,rectangle = 0;
  while(~scanf("%d,%d,%d",&a,&b,&c)){
  if(a == b)lozenges++; 
  if(c*c == (a*a + b*b) )rectangle++;
  }
  cout << rectangle << endl;
  cout << lozenges << endl;
}