// yukicoder: No.420 mod2漸化式 // 2019.5.9 bal4u #include long long tbl[35][35]; long long combi(int n, int k) { long long ans; if (tbl[n][k]) return tbl[n][k]; if ((k << 1) > n) k = n-k; if (k == 0) ans = 1; else if (k == 1) ans = n; else ans = combi(n-1, k) + combi(n-1, k-1); return tbl[n][k] = ans; } int main() { int x; scanf("%d", &x); if (x == 0) puts("0 0"); else printf("%lld %lld\n", combi(31, x), 2147483647LL*combi(30, x-1)); return 0; }