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