#include<stdio.h>
#include<math.h>

int main(void){
	int x,y,t,t_c,tri=0,his=0;
	while(scanf("%d,%d,%d",&x,&y,&t)!=EOF){
	t_c=sqrt(x*x+y*y);
	if(x==y)his++;
	else if(t==t_c)tri++;
	}
	printf("%d\n%d\n",tri,his);
return 0;
}