#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long int #define ti4 tuple #define pii pair template void Fill(A (&array)[N], const T &val){ std::fill( (T*)array, (T*)(array+N), val ); } ll comb(ll n, ll a) { ll c = 1; for(ll i = n;i > n - a;i--) { c *= i; } for(ll i = 1;i < 1 + a;i++) { c /= i; } return c; } int main() { ll x; cin >> x; if(x > 31) { cout << "0 0" << endl; return 0; } ll count = comb(31, x); ll m = INT_MAX; m *= comb(30, x-1); cout << count << " " << m << endl; return 0; }