
if __name__ == '__main__':

	x = y = 0

	while True:

		try:
			a,b,c = map(int,input().split(","))

			if a*a + b*b == c*c:
				x += 1
			elif a == b:
				y += 1

		except EOFError:
			break

	print(x)
	print(y)


