#include using namespace std; typedef long long LL; typedef vector V; typedef vector VV; void rec(int v,int cnt,VV& f,VV &sum){ if(v=0)return; if(cnt==0){ rec(v-1,cnt,f,sum); f[v][cnt]=f[v-1][cnt]; sum[v][cnt]=sum[v-1][cnt]; return; } rec(v-1,cnt-1,f,sum); rec(v-1,cnt,f,sum); f[v][cnt]=f[v-1][cnt-1]+f[v-1][cnt]; sum[v][cnt]=sum[v-1][cnt]+sum[v-1][cnt-1]+f[v-1][cnt-1]*(1ll<<(v-1)); } int main(){ VV f(40,V(40,-1)),sum(40,V(40,0)); f[1][1]=1;f[1][0]=1;sum[1][1]=1;f[0][0]=0; int x; cin>>x;rec(31,x,f,sum); if(x>31){cout<<"0 0"<