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