n=int(input()) ary=[] for i in range(31): if (n>>i)&1:ary.append(i) if len(ary)==1: print(-1,-1,-1) else: a=n^(1<