#include <iostream>
using namespace std;
int main(void){
    int a, b, c;
    int X = 0, Y = 0;
     
    while(scanf("%d,%d,%d", &a, &b, &c) != EOF){
        if(a * a + b * b == c * c) X++;
        else if(a == b) Y++;
    }
    cout << X << endl;
    cout << Y << endl;
}
