#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    int a, b, c;
    int cho = 0;
    int hishi = 0;
    while (scanf("%d,%d,%d", &a, &b, &c)!= EOF) {

        if (a == b)
            hishi++;
        if (a*a + b*b == c*c)
            cho++;
        //printf("hishi=%d, cho=%d\n", hishi, cho);
    }

    cout << cho << endl;
    cout << hishi << endl;
}
