#include<iostream>
using namespace std;
int main(void){
int a,b,c,d=0,e=0;
char ch;
  while(cin >> a >> ch >> b >> ch >> c){
    if(a*a+b*b == c*c)d++;
    if(a == b)e++;
  }
  cout << d << endl << e << endl;
  return 0;
}
