{-9*(6 + k)*(7 + k)*(8 + k)*(1 + n)*S[k]^7 - 18*k*(1 + k)*(2 + k)*(3 + k)*
   S[n] + 9*(6 + k)*(7 + k)*(138 + 32*k + k^2 + 53*n + 10*k*n)*S[k]^6*S[n] + 
  9*(2 + k)*(3 + k)*S[k]*(4 + k + 4*n + k*n + 26*k*S[n]^2 + 8*k^2*S[n]^2 - 
    8*n*S[n]^2 - 2*k*n*S[n]^2) - (3 + k)*S[k]^2*S[n]*
   (152 - 1214*k - 540*k^2 - 45*k^3 + 732*n + 63*k*n - 54*k^2*n - 
    160*S[n]^2 + 1240*k*S[n]^2 + 684*k^2*S[n]^2 + 90*k^3*S[n]^2 - 
    624*n*S[n]^2 - 306*k*n*S[n]^2 - 36*k^2*n*S[n]^2) + 
  S[k]^5*(3784 + 2386*k + 459*k^2 + 27*k^3 + 3016*n + 2242*k*n + 459*k^2*n + 
    27*k^3*n - 768*n^2 - 144*k*n^2 - 60140*S[n]^2 - 30494*k*S[n]^2 - 
    4548*k^2*S[n]^2 - 81*k^3*S[n]^2 + 18*k^4*S[n]^2 - 27542*n*S[n]^2 - 
    15275*k*n*S[n]^2 - 2808*k^2*n*S[n]^2 - 171*k^3*n*S[n]^2 + 48*n^2*S[n]^2 + 
    9*k*n^2*S[n]^2) - S[k]^4*S[n]*(12340 + 24160*k + 8452*k^2 + 972*k^3 + 
    36*k^4 - 12470*n + 2324*k*n + 1818*k^2*n + 144*k^3*n - 5040*n^2 - 
    1152*k*n^2 - 680*S[n]^2 + 4264*k*S[n]^2 + 3496*k^2*S[n]^2 + 
    846*k^3*S[n]^2 + 63*k^4*S[n]^2 - 9110*n*S[n]^2 - 6778*k*n*S[n]^2 - 
    1548*k^2*n*S[n]^2 - 108*k^3*n*S[n]^2 + 315*n^2*S[n]^2 + 
    72*k*n^2*S[n]^2) + S[k]^3*(-1176 - 1306*k - 351*k^2 - 27*k^3 - 504*n - 
    1162*k*n - 351*k^2*n - 27*k^3*n + 672*n^2 + 144*k*n^2 + 840*S[n]^2 - 
    5594*k*S[n]^2 - 5080*k^2*S[n]^2 - 1089*k^3*S[n]^2 - 54*k^4*S[n]^2 - 
    768*n*S[n]^2 + 715*k*n*S[n]^2 - 252*k^2*n*S[n]^2 - 99*k^3*n*S[n]^2 - 
    1386*n^2*S[n]^2 - 297*k*n^2*S[n]^2 - 480*S[n]^4 + 2216*k*S[n]^4 + 
    1976*k^2*S[n]^4 + 486*k^3*S[n]^4 + 36*k^4*S[n]^4 - 1392*n*S[n]^4 - 
    1246*k*n*S[n]^4 - 288*k^2*n*S[n]^4 - 18*k^3*n*S[n]^4 + 84*n^2*S[n]^4 + 
    18*k*n^2*S[n]^4), -54*k*(1 + k)*(2 + k)*(3 + k)*S[n] + 
  54*(1 + k)*(2 + k)*(3 + k)*(16 + 5*k)*S[k]*S[n]^2 - 
  12*(3 + k)*S[k]^2*S[n]*(500 - 176*k - 147*k^2 - 15*k^3 + 480*n + 144*k*n + 
    1064*S[n]^2 + 1186*k*S[n]^2 + 399*k^2*S[n]^2 + 42*k^3*S[n]^2 - 
    30*n*S[n]^2 - 9*k*n*S[n]^2) - 3*(8 + k)*(9 + k)*S[k]^9*
   (80 + 128*n + 48*n^2 + 2920*S[n]^2 + 566*k*S[n]^2 + 27*k^2*S[n]^2 - 
    22*n*S[n]^2 - 3*n^2*S[n]^2) + 6*(8 + k)*S[k]^8*S[n]*
   (6786 + 587*k - 74*k^2 - 3*k^3 + 7632*n + 1072*k*n + 1728*n^2 + 
    240*k*n^2 + 32544*S[n]^2 + 11336*k*S[n]^2 + 1297*k^2*S[n]^2 + 
    48*k^3*S[n]^2 - 981*n*S[n]^2 - 137*k*n*S[n]^2 - 108*n^2*S[n]^2 - 
    15*k*n^2*S[n]^2) + 3*S[k]^3*(2400 + 880*k + 80*k^2 + 3840*n + 1408*k*n + 
    128*k^2*n + 1440*n^2 + 528*k*n^2 + 48*k^2*n^2 + 13104*S[n]^2 - 
    9432*k*S[n]^2 - 10582*k^2*S[n]^2 - 2405*k^3*S[n]^2 - 147*k^4*S[n]^2 + 
    8556*n*S[n]^2 + 6734*k*n*S[n]^2 + 1066*k^2*n*S[n]^2 - 2970*n^2*S[n]^2 - 
    1089*k*n^2*S[n]^2 - 99*k^2*n^2*S[n]^2 + 30048*S[n]^4 + 31976*k*S[n]^4 + 
    12756*k^2*S[n]^4 + 2206*k^3*S[n]^4 + 138*k^4*S[n]^4 + 264*n*S[n]^4 - 
    128*k*n*S[n]^4 - 40*k^2*n*S[n]^4 + 180*n^2*S[n]^4 + 66*k*n^2*S[n]^4 + 
    6*k^2*n^2*S[n]^4) - 2*S[k]^4*S[n]*(-94288 - 7140*k + 10480*k^2 + 
    2112*k^3 + 108*k^4 - 110112*n - 39792*k*n - 3312*k^2*n - 16704*n^2 - 
    5760*k*n^2 - 432*k^2*n^2 - 33384*S[n]^2 - 39948*k*S[n]^2 - 
    18402*k^2*S[n]^2 - 2991*k^3*S[n]^2 - 144*k^4*S[n]^2 - 21270*n*S[n]^2 - 
    2649*k*n*S[n]^2 + 141*k^2*n*S[n]^2 - 9468*n^2*S[n]^2 - 
    3096*k*n^2*S[n]^2 - 261*k^2*n^2*S[n]^2 + 43912*S[n]^4 + 31128*k*S[n]^4 + 
    9212*k^2*S[n]^4 + 1254*k^3*S[n]^4 + 63*k^4*S[n]^4 + 5130*n*S[n]^4 + 
    1434*k*n*S[n]^4 + 96*k^2*n*S[n]^4 + 657*n^2*S[n]^4 + 216*k*n^2*S[n]^4 + 
    18*k^2*n^2*S[n]^4) - S[k]^7*(-37920 - 10800*k - 720*k^2 - 59392*n - 
    17280*k*n - 1152*k^2*n - 20704*n^2 - 6480*k*n^2 - 432*k^2*n^2 + 768*n^3 + 
    1082064*S[n]^2 + 202584*k*S[n]^2 - 13374*k^2*S[n]^2 - 3711*k^3*S[n]^2 - 
    117*k^4*S[n]^2 + 921388*n*S[n]^2 + 261978*k*n*S[n]^2 + 
    18582*k^2*n*S[n]^2 + 134574*n^2*S[n]^2 + 38709*k*n^2*S[n]^2 + 
    2763*k^2*n^2*S[n]^2 - 96*n^3*S[n]^2 + 1053120*S[n]^4 + 591528*k*S[n]^4 + 
    120912*k^2*S[n]^4 + 10602*k^3*S[n]^4 + 333*k^4*S[n]^4 - 95944*n*S[n]^4 - 
    27360*k*n*S[n]^4 - 1947*k^2*n*S[n]^4 - 8330*n^2*S[n]^4 - 
    2394*k*n^2*S[n]^4 - 171*k^2*n^2*S[n]^4 + 3*n^3*S[n]^4) + 
  2*S[k]^6*S[n]*(-161016 - 31256*k + 7090*k^2 + 1416*k^3 + 54*k^4 - 
    197984*n - 76416*k*n - 5664*k^2*n - 28864*n^2 - 15552*k*n^2 - 
    1152*k^2*n^2 + 3072*n^3 + 935768*S[n]^2 + 272568*k*S[n]^2 + 
    14856*k^2*S[n]^2 - 852*k^3*S[n]^2 - 36*k^4*S[n]^2 + 395278*n*S[n]^2 + 
    125376*k*n*S[n]^2 + 9330*k^2*n*S[n]^2 + 36156*n^2*S[n]^2 + 
    12492*k*n^2*S[n]^2 + 936*k^2*n^2*S[n]^2 - 384*n^3*S[n]^2 + 23240*S[n]^4 + 
    46904*k*S[n]^4 + 15524*k^2*S[n]^4 + 1758*k^3*S[n]^4 + 63*k^4*S[n]^4 - 
    33798*n*S[n]^4 - 10614*k*n*S[n]^4 - 792*k^2*n*S[n]^4 - 2147*n^2*S[n]^4 - 
    720*k*n^2*S[n]^4 - 54*k^2*n^2*S[n]^4 + 12*n^3*S[n]^4) - 
  S[k]^5*(27840 + 9360*k + 720*k^2 + 43264*n + 14976*k*n + 1152*k^2*n + 
    14656*n^2 + 5616*k*n^2 + 432*k^2*n^2 - 768*n^3 + 894288*S[n]^2 + 
    185436*k*S[n]^2 - 5292*k^2*S[n]^2 - 2943*k^3*S[n]^2 - 135*k^4*S[n]^2 + 
    616552*n*S[n]^2 + 159282*k*n*S[n]^2 + 10794*k^2*n*S[n]^2 + 
    99148*n^2*S[n]^2 + 23265*k*n^2*S[n]^2 + 1557*k^2*n^2*S[n]^2 + 
    1632*n^3*S[n]^2 + 151456*S[n]^4 + 105696*k*S[n]^4 + 21660*k^2*S[n]^4 + 
    1992*k^3*S[n]^4 + 81*k^4*S[n]^4 + 23244*n*S[n]^4 + 16404*k*n*S[n]^4 + 
    1635*k^2*n*S[n]^4 + 1970*n^2*S[n]^4 + 1980*k*n^2*S[n]^4 + 
    189*k^2*n^2*S[n]^4 - 195*n^3*S[n]^4 - 30800*S[n]^6 - 11088*k*S[n]^6 - 
    924*k^2*S[n]^6 - 8292*n*S[n]^6 - 3096*k*n*S[n]^6 - 258*k^2*n*S[n]^6 - 
    514*n^2*S[n]^6 - 216*k*n^2*S[n]^6 - 18*k^2*n^2*S[n]^6 + 6*n^3*S[n]^6), 
 -288*k*(1 + k)*(2 + k)*(3 + k)*S[n] + 360*(10 + k)*(11 + k)*(12 + k)*
   (13 + k)*S[k]^11*S[n]^2 + 198*k*(1 + k)*(2 + k)*(3 + k)*S[n]^3 - 
  360*(10 + k)*(11 + k)*(12 + k)*(49 + 5*k)*S[k]^10*S[n]^3 - 
  18*(1 + k)*(2 + k)*(3 + k)*S[k]*S[n]^2*(-16 - 20*k + 176*S[n]^2 + 
    55*k*S[n]^2) + 2*(3 + k)*S[k]^2*S[n]*(-12160 + 9280*k + 5760*k^2 + 
    576*k^3 - 15360*n - 4608*k*n + 70792*S[n]^2 + 37052*k*S[n]^2 + 
    6588*k^2*S[n]^2 + 576*k^3*S[n]^2 + 11520*n*S[n]^2 + 3456*k*n*S[n]^2 + 
    23648*S[n]^4 + 27178*k*S[n]^4 + 9207*k^2*S[n]^4 + 963*k^3*S[n]^4 - 
    660*n*S[n]^4 - 198*k*n*S[n]^4) - 
  S[k]^8*S[n]*(-1336832 + 281152*k + 121696*k^2 + 9792*k^3 + 288*k^4 - 
    3241984*n - 468608*k*n - 1152*k^2*n - 1253376*n^2 - 177408*k*n^2 - 
    163584*n^3 - 23040*k*n^3 - 10986336*S[n]^2 - 8331164*k*S[n]^2 - 
    1766338*k^2*S[n]^2 - 144396*k^3*S[n]^2 - 4086*k^4*S[n]^2 + 
    4298176*n*S[n]^2 + 845912*k*n*S[n]^2 + 36072*k^2*n*S[n]^2 + 
    299808*n^2*S[n]^2 + 42336*k*n^2*S[n]^2 + 20448*n^3*S[n]^2 + 
    2880*k*n^3*S[n]^2 + 16143248*S[n]^4 + 7510914*k*S[n]^4 + 
    1286716*k^2*S[n]^4 + 96354*k^3*S[n]^4 + 2673*k^4*S[n]^4 - 
    277840*n*S[n]^4 - 54119*k*n*S[n]^4 - 2250*k^2*n*S[n]^4 - 
    13842*n^2*S[n]^4 - 1953*k*n^2*S[n]^4 - 639*n^3*S[n]^4 - 
    90*k*n^3*S[n]^4) + S[k]^9*(-71680 - 8960*k - 145408*n - 18176*k*n - 
    92160*n^2 - 11520*k*n^2 - 18432*n^3 - 2304*k*n^3 - 8771968*S[n]^2 - 
    4356992*k*S[n]^2 - 745752*k^2*S[n]^2 - 53424*k^3*S[n]^2 - 
    1368*k^4*S[n]^2 + 1231744*n*S[n]^2 + 242480*k*n*S[n]^2 + 
    11664*k^2*n*S[n]^2 + 27648*n^2*S[n]^2 + 3456*k*n^2*S[n]^2 + 
    2304*n^3*S[n]^2 + 288*k*n^3*S[n]^2 + 31171056*S[n]^4 + 
    12762654*k*S[n]^4 + 1952439*k^2*S[n]^4 + 132264*k^3*S[n]^4 + 
    3348*k^4*S[n]^4 - 78880*n*S[n]^4 - 15392*k*n*S[n]^4 - 729*k^2*n*S[n]^4 - 
    1368*n^2*S[n]^4 - 171*k*n^2*S[n]^4 - 72*n^3*S[n]^4 - 9*k*n^3*S[n]^4) + 
  S[k]^7*(197120 + 26880*k + 399872*n + 54528*k*n + 253440*n^2 + 
    34560*k*n^2 + 50688*n^3 + 6912*k*n^3 - 1832864*S[n]^2 + 
    3571920*k*S[n]^2 + 1143328*k^2*S[n]^2 + 104544*k^3*S[n]^2 + 
    3312*k^4*S[n]^2 - 10433632*n*S[n]^2 - 1846928*k*n*S[n]^2 - 
    30096*k^2*n*S[n]^2 - 2748672*n^2*S[n]^2 - 429696*k*n^2*S[n]^2 - 
    292032*n^3*S[n]^2 - 44640*k*n^3*S[n]^2 + 502992*S[n]^4 - 
    4303030*k*S[n]^4 - 1315801*k^2*S[n]^4 - 125028*k^3*S[n]^4 - 
    3978*k^4*S[n]^4 + 5142820*n*S[n]^4 + 993248*k*n*S[n]^4 + 
    30969*k^2*n*S[n]^4 + 587826*n^2*S[n]^4 + 91233*k*n^2*S[n]^4 + 
    35910*n^3*S[n]^4 + 5499*k*n^3*S[n]^4 + 1103056*S[n]^6 + 929978*k*S[n]^6 + 
    213754*k^2*S[n]^6 + 18684*k^3*S[n]^6 + 576*k^4*S[n]^6 - 318536*n*S[n]^6 - 
    60671*k*n*S[n]^6 - 1818*k^2*n*S[n]^6 - 26064*n^2*S[n]^6 - 
    4032*k*n^2*S[n]^6 - 1116*n^3*S[n]^6 - 171*k*n^3*S[n]^6) - 
  S[k]^3*(-53760 - 8960*k - 109056*n - 18176*k*n - 69120*n^2 - 11520*k*n^2 - 
    13824*n^3 - 2304*k*n^3 + 1495008*S[n]^2 + 94560*k*S[n]^2 - 
    93832*k^2*S[n]^2 - 17136*k^3*S[n]^2 - 936*k^4*S[n]^2 + 1323744*n*S[n]^2 + 
    259440*k*n*S[n]^2 + 6768*k^2*n*S[n]^2 + 324864*n^2*S[n]^2 + 
    54144*k*n^2*S[n]^2 + 29376*n^3*S[n]^2 + 4896*k*n^3*S[n]^2 + 
    1767240*S[n]^4 + 1584078*k*S[n]^4 + 441079*k^2*S[n]^4 + 
    56124*k^3*S[n]^4 + 3366*k^4*S[n]^4 - 63036*n*S[n]^4 + 90876*k*n*S[n]^4 + 
    18873*k^2*n*S[n]^4 - 63234*n^2*S[n]^4 - 10539*k*n^2*S[n]^4 - 
    3510*n^3*S[n]^4 - 585*k*n^3*S[n]^4 + 371376*S[n]^6 + 401428*k*S[n]^6 + 
    165830*k^2*S[n]^6 + 29052*k^3*S[n]^6 + 1800*k^4*S[n]^6 + 2376*n*S[n]^6 - 
    6092*k*n*S[n]^6 - 1206*k^2*n*S[n]^6 + 2700*n^2*S[n]^6 + 
    450*k*n^2*S[n]^6 + 108*n^3*S[n]^6 + 18*k*n^3*S[n]^6) + 
  S[k]^4*S[n]*(1802752 - 171264*k - 218432*k^2 - 34560*k^3 - 1728*k^4 + 
    2643712*n + 518016*k*n + 19584*k^2*n + 809472*n^2 + 117504*k*n^2 + 
    99072*n^3 + 13824*k*n^3 + 6310400*S[n]^2 + 1103264*k*S[n]^2 - 
    159540*k^2*S[n]^2 - 45936*k^3*S[n]^2 - 2412*k^4*S[n]^2 + 
    3469168*n*S[n]^2 + 771320*k*n*S[n]^2 + 42264*k^2*n*S[n]^2 + 
    584736*n^2*S[n]^2 + 88416*k*n^2*S[n]^2 + 47520*n^3*S[n]^2 + 
    7488*k*n^3*S[n]^2 + 2610540*S[n]^4 + 2514938*k*S[n]^4 + 
    665532*k^2*S[n]^4 + 76986*k^3*S[n]^4 + 3843*k^4*S[n]^4 - 
    539410*n*S[n]^4 + 15457*k*n*S[n]^4 + 15138*k^2*n*S[n]^4 - 
    140412*n^2*S[n]^4 - 21249*k*n^2*S[n]^4 - 7101*n^3*S[n]^4 - 
    1098*k*n^3*S[n]^4 + 418880*S[n]^6 + 323376*k*S[n]^6 + 109084*k^2*S[n]^6 + 
    15840*k^3*S[n]^6 + 792*k^4*S[n]^6 + 28352*n*S[n]^6 - 2758*k*n*S[n]^6 - 
    1116*k^2*n*S[n]^6 + 6294*n^2*S[n]^6 + 954*k*n^2*S[n]^6 + 234*n^3*S[n]^6 + 
    36*k*n^3*S[n]^6) + S[k]^6*S[n]*(-3118848 + 422784*k + 290176*k^2 + 
    31104*k^3 + 1152*k^4 - 5651712*n - 928256*k*n - 11520*k^2*n - 
    1955328*n^2 - 294912*k*n^2 - 244224*n^3 - 36864*k*n^3 + 11694640*S[n]^2 - 
    913416*k*S[n]^2 - 952632*k^2*S[n]^2 - 103752*k^3*S[n]^2 - 
    3528*k^4*S[n]^2 + 12057328*n*S[n]^2 + 2189408*k*n*S[n]^2 + 
    46800*k^2*n*S[n]^2 + 2495616*n^2*S[n]^2 + 387072*k*n^2*S[n]^2 + 
    210240*n^3*S[n]^2 + 32256*k*n^3*S[n]^2 - 500900*S[n]^4 + 
    2109292*k*S[n]^4 + 664794*k^2*S[n]^4 + 65448*k^3*S[n]^4 + 
    2376*k^4*S[n]^4 - 2710618*n*S[n]^4 - 433148*k*n*S[n]^4 - 
    1440*k^2*n*S[n]^4 - 432930*n^2*S[n]^4 - 67104*k*n^2*S[n]^4 - 
    23418*n^3*S[n]^4 - 3600*k*n^3*S[n]^4 + 1132464*S[n]^6 + 485296*k*S[n]^6 + 
    91672*k^2*S[n]^6 + 8820*k^3*S[n]^6 + 315*k^4*S[n]^6 + 145678*n*S[n]^6 + 
    22134*k*n*S[n]^6 - 90*k^2*n*S[n]^6 + 17787*n^2*S[n]^6 + 
    2754*k*n^2*S[n]^6 + 702*n^3*S[n]^6 + 108*k*n^3*S[n]^6) - 
  S[k]^5*(179200 + 26880*k + 363520*n + 54528*k*n + 230400*n^2 + 
    34560*k*n^2 + 46080*n^3 + 6912*k*n^3 + 6525568*S[n]^2 + 
    2212560*k*S[n]^2 + 658464*k^2*S[n]^2 + 87264*k^3*S[n]^2 + 
    3600*k^4*S[n]^2 + 4600512*n*S[n]^2 + 124720*k*n*S[n]^2 - 
    43632*k^2*n*S[n]^2 + 1936896*n^2*S[n]^2 + 220032*k*n^2*S[n]^2 + 
    201600*n^3*S[n]^2 + 24480*k*n^3*S[n]^2 + 7970064*S[n]^4 + 
    3795654*k*S[n]^4 + 569533*k^2*S[n]^4 + 43380*k^3*S[n]^4 + 
    1926*k^4*S[n]^4 + 1025144*n*S[n]^4 + 525252*k*n*S[n]^4 + 
    41319*k^2*n*S[n]^4 - 30948*n^2*S[n]^4 + 14049*k*n^2*S[n]^4 + 
    1908*n^3*S[n]^4 + 1467*k*n^3*S[n]^4 + 2212004*S[n]^6 + 1769118*k*S[n]^6 + 
    460316*k^2*S[n]^6 + 50112*k^3*S[n]^6 + 2088*k^4*S[n]^6 - 
    314122*n*S[n]^6 - 46875*k*n*S[n]^6 + 1620*k^2*n*S[n]^6 - 
    54744*n^2*S[n]^6 - 9810*k*n^2*S[n]^6 - 2646*n^3*S[n]^6 - 
    477*k*n^3*S[n]^6 + 168224*S[n]^8 + 94584*k*S[n]^8 + 24808*k^2*S[n]^8 + 
    3024*k^3*S[n]^8 + 126*k^4*S[n]^8 + 19952*n*S[n]^8 + 1678*k*n*S[n]^8 - 
    252*k^2*n*S[n]^8 + 3066*n^2*S[n]^8 + 504*k*n^2*S[n]^8 + 108*n^3*S[n]^8 + 
    18*k*n^3*S[n]^8), -2304*k*(1 + k)*(2 + k)*(3 + k)*S[n] - 
  1008*k*(1 + k)*(2 + k)*(3 + k)*S[n]^3 + 2160*(10 + k)*(11 + k)*(12 + k)*
   (13 + k)*S[k]^11*S[n]^4 - 468*k*(1 + k)*(2 + k)*(3 + k)*S[n]^5 + 
  36*(1 + k)*(2 + k)*(3 + k)*S[k]*S[n]^2*(256 + 128*k + 1216*S[n]^2 + 
    332*k*S[n]^2 + 208*S[n]^4 + 65*k*S[n]^4) - 144*(10 + k)*(11 + k)*(12 + k)*
   S[k]^10*S[n]*(-144 - 16*k + 909*S[n]^2 + 101*k*S[n]^2 + 780*S[n]^4 + 
    80*k*S[n]^4) - 8*(3 + k)*S[k]^2*S[n]*(12800 - 29504*k - 14688*k^2 - 
    1440*k^3 + 30720*n + 9216*k*n + 69664*S[n]^2 + 36164*k*S[n]^2 + 
    6462*k^2*S[n]^2 + 594*k^3*S[n]^2 + 11520*n*S[n]^2 + 3456*k*n*S[n]^2 + 
    192484*S[n]^4 + 169700*k*S[n]^4 + 49959*k^2*S[n]^4 + 4995*k^3*S[n]^4 + 
    5400*n*S[n]^4 + 1620*k*n*S[n]^4 + 13472*S[n]^6 + 16090*k*S[n]^6 + 
    5517*k^2*S[n]^6 + 576*k^3*S[n]^6 - 390*n*S[n]^6 - 117*k*n*S[n]^6) + 
  S[k]^9*(-430080 - 1015808*n - 843776*n^2 - 294912*n^3 - 36864*n^4 - 
    97936128*S[n]^2 - 41671680*k*S[n]^2 - 6485760*k^2*S[n]^2 - 
    446976*k^3*S[n]^2 - 11520*k^4*S[n]^2 + 2297856*n*S[n]^2 + 
    28672*k*n*S[n]^2 + 793600*n^2*S[n]^2 + 4608*k*n^2*S[n]^2 + 
    119808*n^3*S[n]^2 + 6912*n^4*S[n]^2 + 568384896*S[n]^4 + 
    229520608*k*S[n]^4 + 34972704*k^2*S[n]^4 + 2386080*k^3*S[n]^4 + 
    61488*k^4*S[n]^4 + 6134784*n*S[n]^4 + 1352640*k*n*S[n]^4 + 
    69120*k^2*n*S[n]^4 - 118432*n^2*S[n]^4 - 576*k*n^2*S[n]^4 - 
    11520*n^3*S[n]^4 - 432*n^4*S[n]^4 + 225666816*S[n]^6 + 
    92841280*k*S[n]^6 + 14271576*k^2*S[n]^6 + 971226*k^3*S[n]^6 + 
    24687*k^4*S[n]^6 - 389072*n*S[n]^6 - 84652*k*n*S[n]^6 - 
    4320*k^2*n*S[n]^6 + 4508*n^2*S[n]^6 + 18*k*n^2*S[n]^6 + 324*n^3*S[n]^6 + 
    9*n^4*S[n]^6) - 2*S[k]^8*S[n]*(13879296 + 13619456*k + 2533760*k^2 + 
    200448*k^3 + 5760*k^4 - 20824064*n - 741376*k*n - 36864*k^2*n - 
    9324544*n^2 - 18432*k*n^2 - 2138112*n^3 - 184320*n^4 - 97306240*S[n]^2 - 
    72714000*k*S[n]^2 - 14342168*k^2*S[n]^2 - 1154160*k^3*S[n]^2 - 
    32616*k^4*S[n]^2 + 38700288*n*S[n]^2 + 4360448*k*n*S[n]^2 + 
    235008*k^2*n*S[n]^2 + 5767424*n^2*S[n]^2 + 25344*k*n^2*S[n]^2 + 
    723456*n^3*S[n]^2 + 34560*n^4*S[n]^2 + 380264864*S[n]^4 + 
    165263036*k*S[n]^4 + 26937298*k^2*S[n]^4 + 1989180*k^3*S[n]^4 + 
    56214*k^4*S[n]^4 + 4122736*n*S[n]^4 + 1761376*k*n*S[n]^4 + 
    100656*k^2*n*S[n]^4 - 757256*n^2*S[n]^4 - 2952*k*n^2*S[n]^4 - 
    65376*n^3*S[n]^4 - 2160*n^4*S[n]^4 + 80658720*S[n]^6 + 
    37125376*k*S[n]^6 + 6368780*k^2*S[n]^6 + 480312*k^3*S[n]^6 + 
    13437*k^4*S[n]^6 - 388360*n*S[n]^6 - 126938*k*n*S[n]^6 - 
    7200*k^2*n*S[n]^6 + 27076*n^2*S[n]^6 + 90*k*n^2*S[n]^6 + 
    1782*n^3*S[n]^6 + 45*n^4*S[n]^6) + 
  S[k]^3*(430080 + 1015808*n + 843776*n^2 + 294912*n^3 + 36864*n^4 - 
    19761408*S[n]^2 - 67584*k*S[n]^2 - 59136*k^2*S[n]^2 - 23040*k^3*S[n]^2 - 
    2304*k^4*S[n]^2 - 20312064*n*S[n]^2 - 20480*k*n*S[n]^2 - 
    7725056*n^2*S[n]^2 + 4608*k*n^2*S[n]^2 - 1299456*n^3*S[n]^2 - 
    80640*n^4*S[n]^2 + 52069952*S[n]^4 + 17555424*k*S[n]^4 + 
    3147648*k^2*S[n]^4 + 222624*k^3*S[n]^4 + 11376*k^4*S[n]^4 + 
    18833536*n*S[n]^4 + 2530240*k*n*S[n]^4 + 317952*k^2*n*S[n]^4 + 
    3338016*n^2*S[n]^4 - 9792*k*n^2*S[n]^4 + 361728*n^3*S[n]^4 + 
    14256*n^4*S[n]^4 + 15391040*S[n]^6 + 18451808*k*S[n]^6 + 
    6494688*k^2*S[n]^6 + 1033434*k^3*S[n]^6 + 62757*k^4*S[n]^6 - 
    1717016*n*S[n]^6 + 218516*k*n*S[n]^6 + 25056*k^2*n*S[n]^6 - 
    383968*n^2*S[n]^6 + 1170*k*n^2*S[n]^6 - 30276*n^3*S[n]^6 - 
    873*n^4*S[n]^6 + 941568*S[n]^8 + 933584*k*S[n]^8 + 406800*k^2*S[n]^8 + 
    71892*k^3*S[n]^8 + 4446*k^4*S[n]^8 + 44656*n*S[n]^8 - 23536*k*n*S[n]^8 - 
    2808*k^2*n*S[n]^8 + 12832*n^2*S[n]^8 - 36*k*n^2*S[n]^8 + 792*n^3*S[n]^8 + 
    18*n^4*S[n]^8) - 2*S[k]^4*S[n]*(-7340032 + 3656704*k + 1565952*k^2 + 
    235008*k^3 + 11520*k^4 - 15564800*n - 1208320*k*n - 110592*k^2*n - 
    6432768*n^2 - 18432*k*n^2 - 1400832*n^3 - 110592*n^4 - 9434112*S[n]^2 - 
    2695232*k*S[n]^2 - 1562000*k^2*S[n]^2 - 231264*k^3*S[n]^2 - 
    10512*k^4*S[n]^2 - 10074880*n*S[n]^2 + 1088768*k*n*S[n]^2 + 
    78336*k^2*n*S[n]^2 - 5107456*n^2*S[n]^2 + 25344*k*n^2*S[n]^2 - 
    870912*n^3*S[n]^2 - 52992*n^4*S[n]^2 + 92050656*S[n]^4 + 
    35730600*k*S[n]^4 + 6860000*k^2*S[n]^4 + 633096*k^3*S[n]^4 + 
    29952*k^4*S[n]^4 + 22137200*n*S[n]^4 + 3028928*k*n*S[n]^4 + 
    315792*k^2*n*S[n]^4 + 3312920*n^2*S[n]^4 - 12168*k*n^2*S[n]^4 + 
    337248*n^3*S[n]^4 + 12528*n^4*S[n]^4 + 11257024*S[n]^6 + 
    13418464*k*S[n]^6 + 4005860*k^2*S[n]^6 + 532440*k^3*S[n]^6 + 
    26451*k^4*S[n]^6 - 2399916*n*S[n]^6 + 32206*k*n*S[n]^6 + 
    1296*k^2*n*S[n]^6 - 411680*n^2*S[n]^6 + 1242*k*n^2*S[n]^6 - 
    30582*n^3*S[n]^6 - 837*n^4*S[n]^6 + 591392*S[n]^8 + 374656*k*S[n]^8 + 
    142288*k^2*S[n]^8 + 20880*k^3*S[n]^8 + 1044*k^4*S[n]^8 + 72956*n*S[n]^8 - 
    14092*k*n*S[n]^8 - 1332*k^2*n*S[n]^8 + 14134*n^2*S[n]^8 - 
    36*k*n^2*S[n]^8 + 828*n^3*S[n]^8 + 18*n^4*S[n]^8) - 
  4*S[k]^6*S[n]*(3496448 - 5853184*k - 1529472*k^2 - 158976*k^3 - 5760*k^4 + 
    18010112*n + 858112*k*n + 55296*k^2*n + 7878656*n^2 + 18432*k*n^2 + 
    1769472*n^3 + 147456*n^4 - 29856416*S[n]^2 + 13470720*k*S[n]^2 + 
    4280872*k^2*S[n]^2 + 466704*k^3*S[n]^2 + 16488*k^4*S[n]^2 - 
    46052096*n*S[n]^2 - 2510336*k*n*S[n]^2 - 163584*k^2*n*S[n]^2 - 
    14051584*n^2*S[n]^2 - 25344*k*n^2*S[n]^2 - 2285568*n^3*S[n]^2 - 
    138240*n^4*S[n]^2 + 148155272*S[n]^4 + 41061584*k*S[n]^4 + 
    5404862*k^2*S[n]^4 + 358992*k^3*S[n]^4 + 13050*k^4*S[n]^4 + 
    36515968*n*S[n]^4 + 4095432*k*n*S[n]^4 + 286200*k^2*n*S[n]^4 + 
    5338744*n^2*S[n]^4 + 7560*k*n^2*S[n]^4 + 564480*n^3*S[n]^4 + 
    22464*n^4*S[n]^4 + 40107520*S[n]^6 + 26338644*k*S[n]^6 + 
    5532398*k^2*S[n]^6 + 521478*k^3*S[n]^6 + 18648*k^4*S[n]^6 - 
    2946050*n*S[n]^6 + 130496*k*n*S[n]^6 + 10098*k^2*n*S[n]^6 - 
    590450*n^2*S[n]^6 - 666*k*n^2*S[n]^6 - 45504*n^3*S[n]^6 - 
    1332*n^4*S[n]^6 + 2027728*S[n]^8 + 1180016*k*S[n]^8 + 288760*k^2*S[n]^8 + 
    29232*k^3*S[n]^8 + 1044*k^4*S[n]^8 + 60926*n*S[n]^8 - 23554*k*n*S[n]^8 - 
    1710*k^2*n*S[n]^8 + 19359*n^2*S[n]^8 + 18*k*n^2*S[n]^8 + 
    1170*n^3*S[n]^8 + 27*n^4*S[n]^8) + 
  S[k]^7*(1290240 + 3047424*n + 2531328*n^2 + 884736*n^3 + 110592*n^4 - 
    63019776*S[n]^2 + 44359680*k*S[n]^2 + 10482432*k^2*S[n]^2 + 
    944640*k^3*S[n]^2 + 29952*k^4*S[n]^2 - 154628096*n*S[n]^2 - 
    5550080*k*n*S[n]^2 - 221184*k^2*n*S[n]^2 - 55863296*n^2*S[n]^2 - 
    299520*k*n^2*S[n]^2 - 10165248*n^3*S[n]^2 - 721152*n^4*S[n]^2 + 
    248585024*S[n]^4 - 50079680*k*S[n]^4 - 21341136*k^2*S[n]^4 - 
    2238912*k^3*S[n]^4 - 68832*k^4*S[n]^4 + 188170880*n*S[n]^4 + 
    20120640*k*n*S[n]^4 + 1188864*k^2*n*S[n]^4 + 27890272*n^2*S[n]^4 + 
    120384*k*n^2*S[n]^4 + 3098880*n^3*S[n]^4 + 132624*n^4*S[n]^4 + 
    506829248*S[n]^6 + 255802816*k*S[n]^6 + 46026264*k^2*S[n]^6 + 
    3765078*k^3*S[n]^6 + 118575*k^4*S[n]^6 - 7199544*n*S[n]^6 + 
    2818412*k*n*S[n]^6 + 186624*k^2*n*S[n]^6 - 3381928*n^2*S[n]^6 - 
    11538*k*n^2*S[n]^6 - 269100*n^3*S[n]^6 - 8235*n^4*S[n]^6 + 
    54597312*S[n]^8 + 28752048*k*S[n]^8 + 5713980*k^2*S[n]^8 + 
    490284*k^3*S[n]^8 + 15345*k^4*S[n]^8 - 189424*n*S[n]^8 - 
    253392*k*n*S[n]^8 - 16254*k^2*n*S[n]^8 + 116024*n^2*S[n]^8 + 
    324*k*n^2*S[n]^8 + 7182*n^3*S[n]^8 + 171*n^4*S[n]^8) + 
  S[k]^5*(-1290240 - 3047424*n - 2531328*n^2 - 884736*n^3 - 110592*n^4 - 
    32215296*S[n]^2 - 7787520*k*S[n]^2 - 4043520*k^2*S[n]^2 - 
    511488*k^3*S[n]^2 - 20736*k^4*S[n]^2 - 37433344*n*S[n]^2 + 
    4657152*k*n*S[n]^2 + 221184*k^2*n*S[n]^2 - 24171520*n^2*S[n]^2 + 
    290304*k*n^2*S[n]^2 - 5170176*n^3*S[n]^2 - 384768*n^4*S[n]^2 + 
    155406720*S[n]^4 + 25216384*k*S[n]^4 + 182928*k^2*S[n]^4 - 
    381888*k^3*S[n]^4 - 18144*k^4*S[n]^4 + 53332224*n*S[n]^4 + 
    6575168*k*n*S[n]^4 + 635904*k^2*n*S[n]^4 + 5807392*n^2*S[n]^4 - 
    110016*k*n^2*S[n]^4 + 384768*n^3*S[n]^4 + 1008*n^4*S[n]^4 + 
    257620960*S[n]^6 + 131512040*k*S[n]^6 + 26819748*k^2*S[n]^6 + 
    2643678*k^3*S[n]^6 + 109593*k^4*S[n]^6 + 22608288*n*S[n]^6 + 
    5290284*k*n*S[n]^6 + 428544*k^2*n*S[n]^6 + 1989612*n^2*S[n]^6 + 
    10350*k*n^2*S[n]^6 + 225324*n^3*S[n]^6 + 9099*n^4*S[n]^6 + 
    18986080*S[n]^8 + 18068752*k*S[n]^8 + 4878972*k^2*S[n]^8 + 
    561816*k^3*S[n]^8 + 23409*k^4*S[n]^8 - 2840936*n*S[n]^8 - 
    212312*k*n*S[n]^8 - 17226*k^2*n*S[n]^8 - 371560*n^2*S[n]^8 - 
    288*k*n^2*S[n]^8 - 27558*n^3*S[n]^8 - 765*n^4*S[n]^8 + 506688*S[n]^10 + 
    221760*k*S[n]^10 + 72912*k^2*S[n]^10 + 9072*k^3*S[n]^10 + 
    378*k^4*S[n]^10 + 85112*n*S[n]^10 - 9072*k*n*S[n]^10 - 
    756*k^2*n*S[n]^10 + 14404*n^2*S[n]^10 + 828*n^3*S[n]^10 + 
    18*n^4*S[n]^10), 22680 - 24786*(7 + k) + 10575*(7 + k)^2 - 
  2205*(7 + k)^3 + 225*(7 + k)^4 - 9*(7 + k)^5 + 
  9*(8 + k)*(9 + k)*(10 + k)*(11 + k)*(12 + k)*S[k]^10 - 
  108*(7 + k)*(8 + k)*(9 + k)*(10 + k)*(11 + k)*S[k]^9*S[n] + 
  18*k*(1 + k)*(2 + k)*(3 + k)*(4 + k)*S[n]^2 - 
  36*(1 + k)*(2 + k)*(3 + k)*(4 + k)*S[k]*S[n]*(25 + k + 5*S[n]^2 + 
    2*k*S[n]^2) + 5*(8 + k)*(9 + k)*S[k]^8*(-5024 - 1862*k - 225*k^2 - 
    9*k^3 + 96*n + 36142*S[n]^2 + 13876*k*S[n]^2 + 1746*k^2*S[n]^2 + 
    72*k^3*S[n]^2 - 6*n*S[n]^2) - 10*(8 + k)*S[k]^7*S[n]*
   (-105192 - 58792*k - 12052*k^2 - 1080*k^3 - 36*k^4 + 1584*n + 240*k*n + 
    152955*S[n]^2 + 84821*k*S[n]^2 + 17501*k^2*S[n]^2 + 1593*k^3*S[n]^2 + 
    54*k^4*S[n]^2 - 99*n*S[n]^2 - 15*k*n*S[n]^2) + 
  (3 + k)*(4 + k)*S[k]^2*(2360 + 1750*k + 495*k^2 + 45*k^3 + 480*n + 
    25510*S[n]^2 + 22664*k*S[n]^2 + 4536*k^2*S[n]^2 + 162*k^3*S[n]^2 - 
    990*n*S[n]^2 + 2060*S[n]^4 + 2176*k*S[n]^4 + 864*k^2*S[n]^4 + 
    108*k^3*S[n]^4 + 60*n*S[n]^4) - 2*(4 + k)*S[k]^3*S[n]*
   (-26520 - 65128*k - 23868*k^2 - 2808*k^3 - 108*k^4 + 37200*n + 8880*k*n + 
    133965*S[n]^2 + 131357*k*S[n]^2 + 40147*k^2*S[n]^2 + 4617*k^3*S[n]^2 + 
    162*k^4*S[n]^2 - 8565*n*S[n]^2 - 1995*k*n*S[n]^2 + 5310*S[n]^4 + 
    5106*k*S[n]^4 + 2326*k^2*S[n]^4 + 486*k^3*S[n]^4 + 36*k^4*S[n]^4 + 
    390*n*S[n]^4 + 90*k*n*S[n]^4) - 2*S[k]^5*S[n]*
   (1514640 + 1601104*k + 560180*k^2 + 89960*k^3 + 7020*k^4 + 216*k^5 - 
    501120*n - 118400*k*n - 4320*k^2*n - 80640*n^2 - 15360*k*n^2 + 
    2493960*S[n]^2 + 1706492*k*S[n]^2 + 472860*k^2*S[n]^2 + 
    65120*k^3*S[n]^2 + 4320*k^4*S[n]^2 + 108*k^5*S[n]^2 + 91800*n*S[n]^2 + 
    19080*k*n*S[n]^2 + 270*k^2*n*S[n]^2 + 10080*n^2*S[n]^2 + 
    1920*k*n^2*S[n]^2 + 357735*S[n]^4 + 339178*k*S[n]^4 + 124840*k^2*S[n]^4 + 
    22590*k^3*S[n]^4 + 2025*k^4*S[n]^4 + 72*k^5*S[n]^4 - 3780*n*S[n]^4 - 
    730*k*n*S[n]^4 - 315*n^2*S[n]^4 - 60*k*n^2*S[n]^4) + 
  S[k]^6*(1254080 + 950200*k + 282480*k^2 + 41610*k^3 + 3060*k^4 + 90*k^5 - 
    79360*n - 16160*k*n - 480*k^2*n - 23040*n^2 - 3840*k*n^2 - 
    3423520*S[n]^2 - 2948362*k*S[n]^2 - 969630*k^2*S[n]^2 - 
    154840*k^3*S[n]^2 - 12150*k^4*S[n]^2 - 378*k^5*S[n]^2 + 117600*n*S[n]^2 + 
    34290*k*n*S[n]^2 + 2430*k^2*n*S[n]^2 + 2880*n^2*S[n]^2 + 
    480*k*n^2*S[n]^2 + 5096970*S[n]^4 + 3897775*k*S[n]^4 + 
    1185330*k^2*S[n]^4 + 179300*k^3*S[n]^4 + 13500*k^4*S[n]^4 + 
    405*k^5*S[n]^4 - 7040*n*S[n]^4 - 2080*k*n*S[n]^4 - 150*k^2*n*S[n]^4 - 
    90*n^2*S[n]^4 - 15*k*n^2*S[n]^4) + 
  S[k]^4*(-316000 - 326680*k - 126840*k^2 - 24330*k^3 - 2340*k^4 - 90*k^5 + 
    45440*n + 4640*k*n - 480*k^2*n + 23040*n^2 + 3840*k*n^2 + 938040*S[n]^2 - 
    139478*k*S[n]^2 - 299230*k^2*S[n]^2 - 70340*k^3*S[n]^2 - 
    5670*k^4*S[n]^2 - 162*k^5*S[n]^2 + 568040*n*S[n]^2 + 304670*k*n*S[n]^2 + 
    36030*k^2*n*S[n]^2 - 48960*n^2*S[n]^2 - 8160*k*n^2*S[n]^2 + 
    1461110*S[n]^4 + 1563309*k*S[n]^4 + 627870*k^2*S[n]^4 + 
    117020*k^3*S[n]^4 + 10260*k^4*S[n]^4 + 351*k^5*S[n]^4 - 65120*n*S[n]^4 - 
    40820*k*n*S[n]^4 - 5130*k^2*n*S[n]^4 + 5850*n^2*S[n]^4 + 
    975*k*n^2*S[n]^4 + 21700*S[n]^6 + 21742*k*S[n]^6 + 10060*k^2*S[n]^6 + 
    2680*k^3*S[n]^6 + 360*k^4*S[n]^6 + 18*k^5*S[n]^6 + 1840*n*S[n]^6 + 
    1360*k*n*S[n]^6 + 180*k^2*n*S[n]^6 - 180*n^2*S[n]^6 - 30*k*n^2*S[n]^6)}
