#include using namespace std; using i64 = long long; i64 comb(i64, i64); int main() { cin.tie(nullptr); ios::sync_with_stdio(false); i64 x; cin >> x; if (x == 0) { cout << 1 << " " << 0 << endl; return 0; } if (x > 31) { cout << 0 << " " << 0 << endl; return 0; } cout << comb(31, x) << " " << 2147483647 * comb(30, x - 1) << endl; return 0; } i64 comb(i64 p, i64 q) { i64 ret = 1; for (int i = 1; i <= q; i++) { ret = ret * (p - i + 1) / i; } return ret; }