#include <iostream>
using namespace std;
 
int main()
{
    int a = 0, b = 0;
    int x,y,z;
    char a, b;
    while(cin >> x >> a >> y >> b >> z)
   {
        if(((x * x) + (y * y)) == z* z) a++;
        if(x == y) b++;
    }j
    cout << a << endl;
    cout << b << endl;
    return 0;
}