#include<iostream>
using namespace std;

int main()
{
    int a, b, c;
    char p;

    int x = 0, y = 0;

    while( cin >> a >> p >> b >> p >> c )
    {
        if( a * a + b * b == c * c )
            x++;
        if( a == b )
            y++;
    }

    cout << x << endl << y << endl;

    return 0;
}
