#include <iostream>
using namespace std;
int main(){
	char e,f;
	int a,b,c;
	int t=0,h=0;
	while(cin>>a>>e>>b>>f>>c){
		if(a==b){
			h++;
		}
		else if((a*a)+(b*b)==(c*c)){
			t++;
		}
	}
	cout<<t<<endl;
	cout<<h<<endl;
	return 0;
}