#include using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); ++i) typedef unsigned long long ll; ll nCr(int n, int r){ if(n0){ u*=n; n--; q--; } while(r>0){ d*=r; r--; } return u/d; } int main() { int x; cin >> x; if(x>=32){ cout << 0 << endl << 0 << endl; return 0; }else if(x==0){ cout << 1 << endl << 0 << endl; return 0; } cout << nCr(31,x) << " " << (pow(2,31)-1)*(nCr(30,x-1)) << endl; return 0; }