lozenge =0
rectangle =0

while True:
    try:
        a,b,c = map(int, raw_input().split(','))
    except:
        break

    if (a*a+b*b==c*c): rectangle +=1
    if (a==b): lozenge +=1
print rectangle
print lozenge