#include<iostream>

int main(){
	int a,b,c;
	char dummy;
	int t=0, h=0;
	while(std::cin>>a>>dummy>>b>>dummy>>c){
		if(a == b)h++;
		if((a*a+b*b)==c*c)t++;
	}
	std::cout<<t<<std::endl;
	std::cout<<h<<std::endl;
	return 0;
}