rectangles = 0
lozenges = 0
while True:
    try:
        x, y, r = map(int, raw_input().split(','))
        if x == y:
            lozenges += 1
        elif x**2 + y**2 == r**2:
            rectangles += 1
    except EOFError:
        print rectangles
        print lozenges
        break