tyo = 0
hisi = 0
while True:
    try:
        a,b,c = map(int, input().split(","))
        if c**2 == a**2+b**2 : tyo += 1
        if a == b: hisi += 1
    except EOFError:
        break
print(tyo)
print(hisi)