import sys
import math
num = []
cyou, hisi = 0, 0
for i in sys.stdin:
	num = map(int, i.split(","))
	kaku = math.acos(num[0]/num[1])*(180/math.pi)
	if kaku == 90:
		cyou += 1
	elif num[0] == num[1]:
		hisi += 1

print cyou
print hisi