#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int comb[32][32]; void init() { REP (i, 32) { comb[i][0] = comb[i][i] = 1; for (int j = 1; j < i; j++) comb[i][j] = comb[i-1][j-1] + comb[i-1][j]; } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); init(); int x; cin >> x; if (x < 1 || 31 < x) cout << 0 << " " << 0 << endl; else { int y = comb[31][x]; long long z = 0; for (int i = 0; i < 31; i++) z += (1LL << i) * comb[30][x-1]; cout << y << " " << z << endl; } return 0; }