#include using namespace std; const int mod = 1000000007; int x, fact[109], inv[109], factinv[109]; int main() { fact[0] = 1; for(int i = 1; i <= 100; i++) fact[i] = 1LL * fact[i - 1] * i % mod; inv[1] = 1; for(int i = 2; i <= 100; i++) inv[i] = 1LL * inv[mod % i] * (mod - mod / i) % mod; factinv[0] = 1; for(int i = 1; i <= 100; i++) factinv[i] = 1LL * factinv[i - 1] * inv[i] % mod; cin >> x; if(x >= 32) { cout << 0 << ' ' << 0 << endl; } else { int res = 1LL * fact[31] * factinv[x] % mod * factinv[31 - x] % mod; long long ret = 1LL * res * x / 31 * 2147483647; cout << res << ' ' << ret << endl; } }