#include<cstdio>
using namespace std;
int main(){
	int rec=0,dia=0;
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(a*a+b*b==c*c)rec++;
		else if(a==b)dia++;
	}
	printf("%d\n%d\n",rec,dia);
	return 0;
}