import sys
c=[]
l=[list(map(int,t.split(","))) for t in sys.stdin]
for i in l:
    if i[0]**2+i[1]**2==i[2]**2:
        c.extend([1])
    elif i[0]==i[1]:
        c.extend([2])
print("{}\n{}".format(
    len([i for i in c if i==1]),
    len([i for i in c if i==2])
    ))
    

