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