#include using namespace std; typedef long long ll; #define int ll // start int comb[32][32]; int C(int n, int k) { if(comb[n][k]) return comb[n][k]; else if(n == k || !k) return comb[n][k] = 1; return comb[n][k] = C(n-1, k) + C(n-1, k-1); } //end signed main(void) { int x, m = 2, Count, nsum, lastn; Count = nsum = 0; m <<= 30; m--; cin >> x; Count = C(31, x); if(x!=0) nsum = C(30, x-1) * 2147483647; cout << Count << " " << nsum << endl; return 0; }