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