import sys
j = []
for line in sys.stdin:
    try:
        a, b, c = line.split(",")
        if int(a) ** 2 + int(b) ** 2 - int(c) ** 2 >= 0:
            j += [int(a)**2 + int(b)**2 - int(c)**2]
    except:
        break
print(len([i for i in j if not i]))
print(len([i for i in j if i]))