#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 = 1;i < 1 + a;i++) { ll v = n - i + 1; c *= v; c /= i; } return c; } int main() { ll x; cin >> x; if(x > 31) { cout << "0 0" << endl; return 0; } if(x == 0) { cout << "1 0" << endl; return 0; } ll v = x >= 16 ? 31 - x : x; ll count = comb(31, v); ll m = INT_MAX; ll t = x - 1; if(t >= 16) { t = 30 - t; } m *= comb(30, t); cout << count << " " << m << endl; return 0; }