N = int(input()) a, b, c = 0, 0, 0 for k in range(32): if N & (1 << k): if a == 0: a += 1 << k else: b += 1 << k c += 1 << k if b == 0: print(-1, -1, -1) else: print(a, b, c)