#include <cstdio>
#include <cstring>
int len,t1=0,t2 = 0;
int main(){
    int x,y,z;
    len = 0;
    t1 = 0;
    t2 = 0;
    int t = 0;
    while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
        if(x*x+y*y==z*z) t1++;
        if(x==y) t2++;
    }
    printf("%d\n%d\n",t1,t2);
}