#include using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define vv(type, c, m, n, i) vector> c(m, vector(n, i)) #define rep(i,a,n) for(int i=(a), i##_len=(n); ii##_len; --i) #define len(x) ((int)(x).size()) #define mp make_pair #define eb emplace_back #define em emplace #define pb pop_back #define fi first #define se second #define get(a, i) get(a) typedef long long ll; typedef long double ld; typedef vector vi; typedef vector vd; typedef vector vll; typedef vector vs; typedef vector vb; typedef pair pii; #define mini min_element #define maxi max_element #define sum(a, b) accumulate(a, b) #define chmax(a,b) if(ab)a=b #define ce(x, y) (x + y - 1) / y #define print(t) cout << (t) << "\n"; #define printk(v) {rep(i, 0, len(v) - 1) { cout << v[i] << " "; } cout << v.back() << endl;} ll c(ll y, ll x) { if (x == 0) return 1; if (x < 0) return 0; if (y / 2 < x) x = y - x; ll t = 1; rep(i, 1, x + 1) { t = t * (y + 1 - i) / i; } return t; } int main() { ll x; cin >> x; if (x < 32) cout << c(31L, x) << " " << c(30L, x - 1) * 2147483647 << endl; else print("0 0"); return 0; }