#include <bits/stdc++.h>
using namespace std;

int main() {
    int a, b, c;
    int r1 = 0, r2 = 0;
    while(~scanf("%d,%d,%d", &a, &b, &c)) {
        r1 += a * a + b * b == c * c;
        r2 += a == b;
    }
    cout << r1 << "\n" << r2 << endl;
}
