#include <cstdio>
#include <iostream>
#include <string>
using namespace std;

int main(){
    string s;
    int a = 0, b = 0;
    while(getline(cin,s)){
        int p1, p2, p3;
        sscanf(s.c_str(), "%d,%d,%d", &p1, &p2, &p3);
        if(p1*p1+p2*p2 == p3*p3){
            a++;
        } else 
        if(p1 == p2){
            b++;
        }
    }
    cout << a << endl << b << endl;
    return 0;
}