import sys

tyou = 0
hishi = 0

for line in sys.stdin:
    L = map(int, line.split(","))
    
    if L:
        if (L[2] ** 2 == L[0] ** 2 + L[1] ** 2):
            tyou += 1

        if (L[0] == L[1]):
            hishi += 1
    else:
        break

print tyou
print hishi