#include <iostream>
using namespace std;

int main(void){
    string s;
    char q;
    int a,b,c,d=0,e=0;
    while(cin>>a>>q>>b>>q>>c){
        if(a==b) d++;
        if(a*a+b*b==c*c) e++;
        
    }
    cout<<e<<endl<<d<<endl;
}

