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