#include<iostream>
using namespace std;
int main(){
  int l1,l2,l3,ans1,ans2;
  char a;
  ans1 = 0; ans2 = 0;
  while(cin >> l1 >>a >>l2 >>a>>l3){
    if(l1 == l2)
      ans2++;
    if(l1*l1 + l2*l2 == l3*l3)
      ans1++;
  }
  cout << ans1 << endl << ans2 << endl;
}