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

int main(){

  int a,b,c,count = 0,count2 = 0;
  char x,y;

  while(cin >> a >> x >> b >> y >> c){

    if(c*c == a*a + b*b) count++;
    else if(a == b) count2++;

  }

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