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

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