n_rect = 0
n_dia = 0
while True:
    try:
        a,b,c = map(int, input().split(','))
        if a**2 + b**2 == c**2:
            n_rect += 1
        if a == b:
            n_dia += 1
    except EOFError:
        break

print(n_rect) 
print(n_dia) 