cho=0
his=0
while True:
    try:
        x,y,r=map(int,raw_input().split(','))
    except EOFError:
        break
    if x == y:
        his+=1
    if r**2==(x**2+y**2):
        cho+=1
print cho
print his