from sys import stdin def str_in(): return stdin.readline().rstrip() def int_in(): return int(stdin.readline().rstrip()) def split_str_in(): return stdin.readline().rstrip().split() def split_int_in(): return [int(x) for x in stdin.readline().rstrip().split()] import math N = int_in() A = 0 B = 0 C = 0 for i in range(int(math.log(N, 2) + 1)): if N & (1 << i): if C != 0: A = A | (1 << i) B = B | (1 << i) else: C = C | (1 << i) B = B | (1 << i) if A * B * C != 0: print(str(A) + ' ' + str(B) + ' ' + str(C)) else: print("-1 -1 -1")