rec = 0
rod = 0
E = 10**-10
while(1):
    try:
        a,b,c = [int(i) for i in input().split(",")]
        if abs(c**2 - (a**2+b**2)) < E:
            rec += 1
        elif a == b:
            rod += 1
    except EOFError:
        print(rec)
        print(rod)
        break
