#include<iostream>
using namespace std;
    int main(void){
    int a,b,c;
    int count_a=0,count_b=0;
    char x;
    while(cin >> a >> x >> b >> x >>c){
        if(a*a + b*b == c*c) count_a++;
        else if(a == b) count_b++;
    }
    cout << count_a << endl;
    cout << count_b << endl;
}
