#include<cstdio>


using namespace std;
int main(void)
{
	int a[3],b = 0,c = 0;
	char z[2];
	while(1)
	{
		if(scanf("%d%c%d%c%d",&a[0],&z[0],&a[1],&z[1],&a[2]) == EOF) break;
		if(a[0] == a[1]) c += 1;
		if(a[2]*a[2] == a[0]*a[0]+a[1]*a[1]) b+= 1;
	}
	printf("%d\n%d\n",b,c);
	return 0;
}