#include <iostream>
#include <stdio.h>
using namespace std;

int main(void){
    int a,b,c;
    int rect=0;
    int dia=0;
    while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
        if(a*a+b*b==c*c){
            rect+=1;
        }
        if(a==b){
            dia+=1;
        }
    }
    cout<<rect<<endl;
    cout<<dia<<endl;
}

