#include #include #define rep(i, n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int x; ll c[32][32]; ll s[32][32]; int main(){ scanf("%d", &x); if(x > 31){ puts("0 0"); return 0; } c[0][0] = 1; for(int i = 1; i <= 31; ++i){ c[i][0] = 1; for(int j = 1; j <= i; ++j){ c[i][j] = c[i - 1][j] + c[i - 1][j - 1]; s[i][j] = s[i - 1][j] + s[i - 1][j - 1] + (1 << i - 1) * c[i - 1][j - 1]; } } printf("%lld %lld\n", c[31][x], s[31][x]); return 0; }