rect_cnt = dia_cnt = 0
while True:
    try:
        a, b, c = map(int, input().split(","))
        if a==b:
            dia_cnt = dia_cnt+1
        elif (a**2 + b**2) == c**2:
            rect_cnt = rect_cnt + 1
        else:
            pass
    except EOFError:
        break
print(rect_cnt)
print(dia_cnt)
