N = int(input()) bit = list(bin(N)[2:]) A,B,C = '','','' count = 0 if bit.count('1') == 1: A += '0' B += '1' C += '1' for b in bit: if b == '1': if count%2 == 0: A += '1' B += '1' C += '0' else: A += '0' B += '1' C += '1' count += 1 else: A += '0' B += '0' C += '0' A,B,C = int(A,2),int(B,2),int(C,2) # print(A^B^C,A | B,A | C,B | C) if (A | B) == (A | C) == (B | C) == N and A^B^C == 0: print(A,B,C) else: print(-1,-1,-1) # print(A,B,C)