#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; ll p[11] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 }; ll comb(int n, int x) { map m; for(int i = n; i >= n - x + 1; i--) { ll y = i; for(int j = 0; j < 11; j++) { while(y % p[j] == 0) { m[p[j]]++; y /= p[j]; } } } for(int i = 1; i <= x; i++) { ll y = i; for(int j = 0; j < 11; j++) { while(y % p[j] == 0) { m[p[j]]--; y /= p[j]; } } } ll ret = 1; for(auto v : m) { for(int i = 0; i < v.second; i++) { ret *= v.first; } } return ret; } int main() { cin.tie(0); ios::sync_with_stdio(false); ll x; cin >> x; if(x > 31) { cout << "0 0" << endl; return 0; } ll ans1 = comb(31, x); ll ans2 = 0; for(int i = 0; i < 31; i++) { ans2 += (1LL << i) * comb(30, x - 1); } cout << ans1 << " " << ans2 << endl; }