#include #include #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace std; using namespace atcoder; templateinline bool chmax(T &a, const T &b){if(a < b){a = b; return 1;}return 0;} templateinline bool chmin(T &a, const T &b){if(a > b){a = b; return 1;}return 0;} typedef long long ll; const int dx[] = { 1, 0, -1, 0}; const int dy[] = { 0, 1, 0, -1}; using mint = static_modint<1000000007>; int main(){ ios::sync_with_stdio(false); cin.tie(0); ////////////////////////////////// コード ////////////////////////////////// ll N; cin >> N; vector res; ll tmp = N; int cnt = 0; while(tmp > 0){ if(tmp & 1) res.push_back(cnt); cnt++; tmp >>= 1; } if(res.size() < 2){ cout << "-1 -1 -1" << endl; return 0; }else{ int a = res.size(); ll b = 1; REP(i, res[a-1]+1){ if(i == res[a-1]) cout << b << " "; b *= 2; } b = 1; int c = 0; REP(i, res[a-1]){ if(N >> i & 1) c += b; b *= 2; } cout << c << " "; } cout << N << endl; }