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

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