rectangles = 0 ; lozenges = 0
while True:
	try:
		a,b,c, = map(int,raw_input().split(','))
		if a*a + b*b == c*c: rectangles += 1
		else:
			if a == b: lozenges += 1
			else: pass
	except: break
print rectangles ; print lozenges