#include #include template std::vector vec(int len, T elem) { return std::vector(len, elem); } using lint = long long; constexpr int N = 31; void solve() { auto comb = vec(N + 1, vec(N + 1, 0LL)); comb[0][0] = 1; for (int x = 0; x < N; ++x) { for (int y = 0; y <= x; ++y) { comb[x + 1][y] += comb[x][y]; comb[x + 1][y + 1] += comb[x][y]; } } int x; std::cin >> x; if (x > N) { std::cout << 0 << " " << 0 << std::endl; return; } if (x == 0) { std::cout << 1 << " " << 0 << std::endl; } std::cout << comb[N][x] << " " << comb[N - 1][x - 1] * ((1LL << 31) - 1) << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }