r = 0
l = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
        if a == b:
            l += 1
        else:
            if a**2 + b**2 == c**2:
                r += 1
    except:
        print(r)
        print(l)
        break