ans = [0, 0]
while  True:
    try:
        a, b, c = map(int, input().split(','))
    except:
        break
    if a**2 + b**2 == c**2:
        ans[0] += 1
    if a == b:
        ans[1] += 1
print(*ans, sep="\n")