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