n=int(input()) cnt=[] while n!=0: cnt.append(n%2) n//=2 if cnt.count(1)==1: print(-1,-1,-1) else: cnt2=0 ans=[0]*3 for i in range(len(cnt)): if cnt[i]==1: ans[cnt2%3]+=2**i cnt2+=1 ans[cnt2%3]+=2**i cnt2+=1 print(*ans)