#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){

	int a,b,c;
	int x=0,y=0;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
        if(a*a+b*b==c*c){
            x++;
            //cout<<a<<b<<c<<endl;
        }
        if(a==b){
            y++;
           // cout<<a<<b<<c<<'.'<<endl;
        }
	}
	cout<<x<<endl<<y<<endl;


	return 0;
}