#include using namespace std; int64_t comb(int n, int r) { int64_t res = 1; for (int i = 0; i < r; i++) { res *= n - i; } for (int j = 1; j < r + 1; j++) { res /= j; } return res; } template int64_t pow(int64_t x, T n, int64_t mod = std::numeric_limits::max()) { int64_t res = 1; while (n > 0) { if (n & 1) res = static_cast<__int128>(res) * static_cast<__int128>(x) % mod; x = static_cast<__int128>(x) * static_cast<__int128>(x) % mod; n >>= 1; } return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int x; cin >> x; if (x <= 31) { cout << comb(31, x) << ' ' << (pow(INT64_C(2), 31) - 1) * comb(30, x - 1) << '\n'; } else { cout << 0 << ' ' << 0 << '\n'; } return 0; }