#include using namespace std; #define rep(i,n) for(int i = 0;i < int(n); i++) using lint=long long; signed main(){ lint comb[40][40]={}; rep(n,40){ comb[n][0]=1; for(int r=1;r<=n;r++) comb[n][r]=comb[n-1][r-1]+comb[n-1][r]; } lint x; cin >> x; if(x > 31){ cout << "0 0" << endl; return 0; } else printf("%lld %lld\n",comb[31][x],x==0?0:comb[30][x-1]*((1LL<<31)-1)); return 0; }