@staticmethod
def c():
    (n, m) = map(int, sys.stdin.readline().split())
    cnt = [0, 0, 0]
    if (m == 1):
        cnt = [(- 1), (- 1), (- 1)]
    else:
        if (m & 1):
            m -= 3
            cnt[1] += 1
            n -= 1
        cnt[2] = ((m // 2) - n)
        cnt[0] = (n - cnt[2])
    if ((cnt[0] < 0) or (cnt[1] < 0) or (cnt[2] < 0)):
        print((- 1), (- 1), (- 1))
    else:
        print(*cnt, sep=' ')
@staticmethod
def c():
    (n, m) = map(int, sys.stdin.readline().split())
    cnt = [0, 0, 0]
    if (m == 1):
        cnt = [(- 1), (- 1), (- 1)]
    else:
        if (m & 1):
            m -= 3
            cnt[1] += 1
            n -= 1
        cnt[2] = ((m // 2) - n)
        cnt[0] = (n - cnt[2])
    if ((cnt[0] < 0) or (cnt[1] < 0) or (cnt[2] < 0)):
        print((- 1), (- 1), (- 1))
    else:
        print(*cnt, sep=' ')