#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#include <map>
#include <sstream>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

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