#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()

using namespace std;

typedef pair<int, int> pii;
typedef unsigned long long ull;

int main(void){
    int nt = 0, nh = 0;
    for(int a, b, c; ~scanf("%d,%d,%d", &a, &b, &c);){
        if(a == b) nh ++;
        else if(a * a + b * b == c * c) nt ++;
    }
    cout << nt << endl << nh << endl;

    return 0;
}