#encoding=utf-8

import sys
num = []
cyou, hisi = 0, 0
for i in sys.stdin:
	num = map(int, i.split(","))
	num.sort()
	if num[0]**2 + num[1]**2 == num[2]**2:
		cyou += 1
	elif num[0] == num[1] != num[2]:
		hisi += 1
	
print cyou
print hisi