#include <iostream>
#include <cstdio>

using namespace std;

int main(void) {
    int n = 0, m = 0, a, b, c;
    while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
        if (a * a + b * b == c * c) n++;
        else if (a == b) m++;
    }
    cout << n << endl;
    cout << m << endl;
    return 0;
}