cho = 0
hishi = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
    except:
        break
    if a**2 + b**2 == c**2 and a!=b:
        cho += 1
    elif a**2 + b**2 != c**2 and a==b:
        hishi += 1
print(cho)
print(hishi)
