#include using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(), (c).end() #define zero(a) memset(a, 0, sizeof a) #define minus(a) memset(a, -1, sizeof a) #define watch(a) { cout << #a << " = " << a << endl; } template inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); } template inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); } typedef long long ll; int const inf = 1<<29; constexpr int MOD = 1e9+7; namespace math { constexpr int MaxComb = 1010; struct Combination { long long comb_[MaxComb][MaxComb]; Combination() { rep(i, MaxComb) { comb_[i][0] = 1; REP(j, 1, i+1) { comb_[i][j] = comb_[i-1][j-1] + comb_[i-1][j]; comb_[i][j] %= MOD; } } } long long comb(int n, int r) const { return comb_[n][r]; } }; } math::Combination cb; int main() { ll ans[32] = { 2147483647, 64424509410, 934155386445, 8718783606820, 58851789346035, 306029304599382, 1275122102497425, 4371847208562600, 12569060724617475, 30724370660176050, 64521178386369705, 117311233429763100, 185742786263791575, 257182319442172950, 312292816465495725, 333112337563195440, }; for(int i=0; i<16; i++) { ans[30-i] = ans[i]; } // rep(i, 32) cout << ans[i] << endl; // 31ビット中, 1が立つ組み合わせの数 int x; cin >> x; if(x == 0) { cout << 1 << " " << 0 << endl; } else if(x > 31) cout << 0 << " " << 0 << endl; else { cout << cb.comb(31, x) << " " << ans[x-1] << endl; } return 0; }