#include using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long vector> Combination_dp(int n){ vector> dp(n+1,vector(n+1)); //dp[n][r] = nCr for(int i = 0; i <= n; i++){ dp[i][0] = 1; for(int j = 1; j <= i; j++){ dp[i][j] = dp[i-1][j-1] + dp[i-1][j]; } } return dp; } signed main(){ int x; cin >> x; x = min(32LL, x); auto dp = Combination_dp(40); unsigned long long res = 0; for(int i = 1; i < 31; i++){ res += (1 << i) * dp[30][x-1]; } cout << dp[31][x] << " " << res << endl; return 0; }