#include using namespace std; #include typedef boost::multiprecision::cpp_int mp; int main(){ mp S; cin>>S; vector ans(3,0); mp ind=0; mp co=1; while(S>0){ for(int i=0;i<3;i++){ ans[i]+=(S%2)*co; } ans[(int)ind]-=(S%2)*co; ind=(ind+S%2)%3; S>>=1; co<<=1; } for(int i=0;i<3;i++){ cout<<(ans[0]==0?-1:ans[i])<<' '; } }