s = 0
t = 0
while 1:
    try:
        a,b,c = map(int,input().split(","))
        if a**2 + b**2 == c**2:
            s += 1
        elif a == b  :
            t += 1

    except EOFError:
        print(s)
        print(t)
        break
