#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
    int a,b,c;
    int tyo=0,hisi=0;
    while(scanf("%d,%d,%d",&a,&b,&c)!=EOF)
    {
        if(a*a+b*b==c*c)tyo++;
        else if(a==b)hisi++;
    }
    cout<<tyo<<endl<<hisi<<endl;
    return 0;
}