from math import *
PI = 3.1415926535898
res = []
while True:
	try:
		arr = map(int, raw_input().strip().split(','))
		res.append(arr)
	except EOFError:
		break
ans1 = 0
ans2 = 0
for x in res:
	if x[0]*x[0] + x[1]*x[1] == x[2]*x[2]:
		ans1 += 1
	elif x[0]==x[1]:
		ans2 += 1
print ans1
print ans2