#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int a,b,c;
    int rec=0;
    int dia=0;
    char ch;
    while (cin>>a>>ch>>b>>ch>>c) {
        if (a==b&&a*a*2!=c*c)
            dia++;
        else if (a!=b&&a*a+b*b==c*c)
            rec++;
    }
    cout<<rec<<endl<<dia<<endl;
    return 0;
}
