rectangle=0
lozenge=0
while True:
	try:
		x,y,z=map(int, input().split(","))
		if x==y:
			lozenge+=1
		elif x**2+y**2==z**2:
			rectangle+=1
	except EOFError:
		break
print(rectangle)
print(lozenge)
