# include <stdio.h>
void main()
{
	int m = 0, n = 0, a, b, c;
	while (scanf("%d,%d,%d", &a, &b, &c) !=EOF)
	{
		if (a * a + b * b == c * c)
			m++;
		else if (a == b)
			n++;
	}
	printf("%d\n%d\n", m, n);
}