#include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; typedef std::pair Pii; typedef std::pair Pll; typedef std::pair Pdd; #define rip(i, n, ss) for (int i = (ss);i < (int)( n ); i++) #define all(l) l.begin(), l.end() #define MM << " " << template using MaxHeap = std::priority_queue; template using MinHeap = std::priority_queue, std::greater>; template inline bool chmax(T &l, const T b) { if (l < b) { l = b; return true; } return false; } template inline bool chmin(T &l, const T b) { if (l > b) { l = b; return true; } return false; } # ifdef LOCAL_DEBUG template void vdeb(const std::vector &bb) { for (unsigned int i = 0;i < bb.size();i++) { if (i == bb.size() - 1) std::cout << bb[i]; else std::cout << bb[i] << ' '; } std::cout << '\n'; } template void vdeb(const std::vector> &bb) { for (unsigned int i = 0;i < bb.size();i++) { std::cout << i << ' '; vdeb(bb[i]); } std::cout << '\n'; } # endif using namespace std; int main() { ll n; cin >> n; if(__builtin_popcount(n) < 3) { cout << -1 MM -1 MM -1 << endl; } ll a = n, b = n, c = n; int cnt = 0; rip(i,30, 0) { if((1 << i)&n) { if(cnt == 0) { a ^= 1<< i; cnt++; } else if(cnt == 1) { b ^= 1 << i; } else { c ^= 1 << i; } } } cout << a MM b MM c << endl; }