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

int main(){

  int a[5],count = 0,count2 = 0;

  while( scanf("%d,%d,%d",&a[0],&a[1],&a[2]) != EOF ){

    if(a[0] + a[1] >= a[2]){
      if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) count++;
      else count2++;
    }

  }

  cout << count << endl << count2 << endl;
}