#include<iostream>
#include<cstdio>

using namespace std;

int main(int argc, char *argv[])
{
  int a,b,c;
  int rectangles = 0;
  int lozenges = 0;;
  
  while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
    if(a==b){
      lozenges++;
    }
    else if(c*c ==a*a+b*b){
      rectangles++;
    }
  }
  cout <<rectangles<<endl;
  cout<<lozenges<<endl;
  return 0;
}