#ifdef ONLINE_JUDGE #include #else #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif using namespace std; // lambda : [] (int a, int b) -> bool { body return } // string r_str = R"(raw string)" #define mp make_pair #define mt make_tuple #define eb emplace_back #define pb push_back #define LL long long #define ULL unsigned long long #define BASE 73 #define NMAX 10000 #define NMAX2 20001 #define MOD1 1000000007 #define ALL(V) (V).begin(), (V).end() #define ALLR(V) (V).rbegin(), (V).rend() #define CRLINE Duxar(__LINE__); #define SHOWME(x) cerr << __LINE__ << ": " << #x << " = " << (x) << endl; #define ENTER putchar('\n'); int dx4[] = {-1, 0, 1, 0}; int dy4[] = {0, 1, 0, -1}; int dx8[] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dy8[] = {0, 1, 1, 1, 0, -1, -1, -1}; void Duxar(int _this_line) { #ifndef ONLINE_JUDGE printf("\n . . . . . . . . . . . . . Passed line - %d\n", _this_line); #endif } template void ReadNo(T &_value) { T _sign = 1; char ch; _value = 0; while(!isdigit(ch = getchar())) { (ch == '-') && (_sign = -1); } do { _value = _value * 10 + (ch - '0'); } while(isdigit(ch = getchar())); _value *= _sign; } template void AddNr(T &a, T b) { a = a + b; while (a >= MOD1) { a -= MOD1; } while (a < 0) { a += MOD1; } } int N, R; vector combinations = {0,0,0,0,1, 5, 15, 35, 70, 126, 210, 330, 495, 715, 1001, 1365, 1820, 2380, 3060, 3876, 4845, 5985, 7315, 8855, 10626, 12650, 14950, 17550, 20475, 23751, 27405, 31465, 35960, 40920, 46376, 52360, 58905, 66045, 73815, 82251, 91390, 101270, 111930, 123410, 135751, 148995, 163185, 178365, 194580, 211876, 230300, 249900, 270725, 292825, 316251, 341055, 367290, 395010, 424270, 455126, 487635}; vector facts = { "1", "1", "2", "6", "24", "120", "720", "5040", "40320", "362880", "3628800", "39916800", "479001600", "6227020800", "87178291200", "1307674368000", "20922789888000", "355687428096000", "6402373705728000", "121645100408832000", "2432902008176640000", "51090942171709440000", "1124000727777607680000", "25852016738884976640000", "620448401733239439360000", "15511210043330985984000000", "403291461126605635584000000", "10888869450418352160768000000", "304888344611713860501504000000", "8841761993739701954543616000000", "265252859812191058636308480000000", "8222838654177922817725562880000000", "263130836933693530167218012160000000", "8683317618811886495518194401280000000", "295232799039604140847618609643520000000", "10333147966386144929666651337523200000000", "371993326789901217467999448150835200000000", "13763753091226345046315979581580902400000000", "523022617466601111760007224100074291200000000", "20397882081197443358640281739902897356800000000", "815915283247897734345611269596115894272000000000", "33452526613163807108170062053440751665152000000000", "1405006117752879898543142606244511569936384000000000", "60415263063373835637355132068513997507264512000000000", "2658271574788448768043625811014615890319638528000000000", "119622220865480194561963161495657715064383733760000000000", "5502622159812088949850305428800254892961651752960000000000", "258623241511168180642964355153611979969197632389120000000000", "12413915592536072670862289047373375038521486354677760000000000", "608281864034267560872252163321295376887552831379210240000000000", "30414093201713378043612608166064768844377641568960512000000000000", "1551118753287382280224243016469303211063259720016986112000000000000", "80658175170943878571660636856403766975289505440883277824000000000000", "4274883284060025564298013753389399649690343788366813724672000000000000", "230843697339241380472092742683027581083278564571807941132288000000000000", "12696403353658275925965100847566516959580321051449436762275840000000000000", "710998587804863451854045647463724949736497978881168458687447040000000000000", "40526919504877216755680601905432322134980384796226602145184481280000000000000", "2350561331282878571829474910515074683828862318181142924420699914240000000000000", "138683118545689835737939019720389406345902876772687432540821294940160000000000000", "8320987112741390144276341183223364380754172606361245952449277696409600000000000000" }; int main(){ string fileInput = "sum"; #ifdef INFOARENA freopen((fileInput + ".in").c_str(), "r", stdin); freopen((fileInput + ".out").c_str(), "w", stdout); #else #ifndef ONLINE_JUDGE #endif #endif LL ans = 1, initN; ReadNo(N); ReadNo(R); initN = N; while (N >= 4) { ans *= combinations[N]; N -= 4; } cout << '(' << ans << '/' << facts[initN / 4] << ")^" << R; return 0; }