#include<stdio.h>

int main()
{
	int x,y,z,t=0,h=0;
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF)
	{		
		x*=x;
		y*=y;
		z*=z;

		if(z==(x+y))
		{
			t++;
		}
		else if(x==y)
		{
			h++;
		}
	}
	printf("%d\n%d\n",t,h);
	return 0;
}