#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; #define MX 2147483648LL int main(){ ios::sync_with_stdio(false); ll x; cin >> x; if(x == 0){ cout << 1 << " " << 0 << endl; return 0; } vector v; v.push_back(0); ll now = 0; while(true){ now++; set w; rep(i,v.size()){ if(2*v[i]+1 ww; FOR(it,w){ ll a = *it; while(a