rect_num = 0
diam_num = 0

while True:
    try:
        a,b,c = map(int, input().split(','))
        if a**2 + b**2 == c**2:
            rect_num += 1
        elif a == b:
            diam_num += 1
    except EOFError:
        break

print(rect_num)
print(diam_num)
