hisi = 0
tyou = 0
while True:
    try:
        a,b,c = map(int,input().split(","))
        if a == b:
            hisi += 1
        elif a ** 2 + b ** 2 == c ** 2:
            tyou += 1
    except EOFError:
        print(tyou)
        print(hisi)
        break
        