# AOJ 0032 Plastic Board
# Python3 2018.6.15 bal4u

rect = loz = 0
while True:
	try:
		a, b, c = list(map(int, input().split(',')))
	except EOFError:
		break
		
	if a*a + b*b == c*c:
		rect += 1
	elif a == b and a + b > c and b + c > a:
		loz += 1
print(rect, loz, sep='\n')
