Skip to content

Instantly share code, notes, and snippets.

@PoslavskySV
Last active May 24, 2018 07:29
Show Gist options
  • Save PoslavskySV/d9b86fbf94d7092c40992cab7c3c6f12 to your computer and use it in GitHub Desktop.
Save PoslavskySV/d9b86fbf94d7092c40992cab7c3c6f12 to your computer and use it in GitHub Desktop.
import scala.concurrent.duration._
implicit val ring = Frac(MultivariateRing(Z, Array("n1", "n2", "n3", "n4", "n5", "d", "i", "ppp", "qq")))
val a1 = ring(
"""
| (-24*n3^2*n4*n5-32*n3^2*n4*n2+16*n3^2*n4*d-40*n1*n5*d*n3+24*n1*d^2*
| n3-48*n1*n5^2*d+44*n1*d^2*n5+72*n2*n1^2*n3+2*n4^2*d^2+4*n3^3*d-16*n1*d+32*n1*n5
| +16*n1*n4+32*n1*n2+32*n1^2+32*n1*n3+16*n3*n4+16*n5*n4+3*n3*d^3+80*n1*n2^2*n5+24
| *n1*n3*n2^2+8*n5*d^2*n4-120*n2*n1^2*d+24*n1*n5*n4^2-8*n4*d-80*n1*n5*n4*d+40*n1*
| n5^2*n4+72*n1*n5*n4*n2-72*n1*n2^2*d-4*d*n5*n4*n2-88*n1*n2*d-16*n3^2*n5+96*n1^2*
| n5-80*n1^2*d-16*n3^2*n2+8*n3^2*d-16*n3*n2^2+16*n3*n2*d+64*n1*n2^2+16*n1*n3^2-56
| *n1*n3*d+48*n1*n3*n5+48*n1*n5^2+112*n1*n5*n2+64*n1^2*n3-80*n1*n5*d-16*n3*n5^2+
| 16*n1*n5^2*n3+112*n1^2*n2-32*n3*n5*n2+16*n3*n5*d-4*n3*d^2+64*n1*n2*n3+28*n1*d^2
| -8*n3*n5*n4^2+16*n1*n3*n4^2-96*n5*d*n1^2-40*n5*n3^2*n2+8*n5*n2*n4-56*n1*d*n4-16
| *n3*d*n4-56*n1*n2*n4*d+28*n3*n2^2*d-16*n3*d^2*n2-14*n3*d^2*n5-32*n3*n5^2*n2+20*
| n3*n5^2*d+24*n1^2*n4^2-40*n5*n3*n2^2+40*n1*n4*n3*n5+128*n1^2*n2*n5-52*n1*n3*n4*
| d+56*n1^2*n3*n4+24*n5*n3^2*d+28*d*n3^2*n2-8*n3^3*n2+20*n3*n2*n4*d-16*n3*n2^2*n4
| -24*n3^2*n2^2+16*n1^4-4*n4^2*d+10*n4*d^2-60*n3*d*n1^2-16*n1*n4^2*d+34*n1*d^2*n4
| -8*n1*n3^2*d-3*d^3*n4+32*n3*n1^3+64*n1^3*n2+40*n1*n4*n2*n3-4*n5*n4^2*d-4*n2*d*
| n4+72*n1^2*n4+8*n1*n4^2+48*n1^3-16*n3*n2^3-8*n3^3*n5-52*n3*n2*n1*d+64*n1*n5^2*
| n2+48*n3*d*n2*n5+8*n3*n4^2+2*n2*n4*d^2-8*n3^2*n4+8*n5^2*n4+8*n5*n4^2+80*n1^2*n4
| *n5-76*n1^2*n4*d+72*n1^2*n2*n4-16*n5^2*n3^2-8*n3*n2*n4-24*n5*d*n4-8*n3^2*d^2+16
| *n1*n5^3+32*n1*n2^3+48*n1^3*n5+40*n1*n3*n2*n5-16*n3*n5^2*n4+44*d^2*n1^2-8*n5^3*
| n3-120*n5*n2*n1*d+48*n1^2*n5^2-32*n3*n5*n4*n2+16*n3*n5*n4*d+80*n1*n5*n4+64*n1*
| n4*n3-12*n1*d^3-48*d*n1^3+8*n1*n4*n3^2+32*n1*n4*n2^2+52*n2*n1*d^2+56*n5*n3*n1^2
| +80*n1^2*n2^2-8*n3^3*n4-8*n3^2*n4^2+40*n1^3*n4+16*n1^2*n3^2-4*n5^2*n4*d+40*n1*
| n2*n4)
""".stripMargin)
val b1 = ring("(2*n1+2*n3+2*n5-d)")
val b2 = ring("(2*n1+2*n5+4+2*n3-3*d+2*n2+2*n4)")
val b3 = ring(
"""
| (768+48*n1^4*n2*
| n3-72*d^3*n4^3+1344*n1+2112*n2+1728*n3+1728*n4+2304*n5-2944*d-272*d*n5^2*n2^3+
| 275*n2^2*d^4-512*d*n5^2*n2*n1^2+340*d^2*n2^3*n4+48*n1^3*n2*n3^2+512*n5^2*n2^3+
| 48*n1^3*n2*n4^2+32*n1*n5^4*n2+16*n3*n2^4*n5+4000*n4*n2+768*n1*n3*n5*n2^2*n4+
| 1125*d^4*n3-48*n1*n5^3*n3^2-120*n1*n2^4*d+48*n1*n3^2*n2^3-1096*n1*n2^2*n5*d*n3+
| 416*n1*n3^2*d^2*n2+64*n3^2*n2^2*n5^2+32*n1^4*n5+3008*n3^2*n4*n5+2944*n3^2*n4*n2
| -8*n1^5*d+620*d^2*n5^3*n4+144*n1^2*n2^3*n3+24*n5^4*d*n1-4000*n3^2*n4*d-5560*n1*
| n5*d*n3+4320*n1*d^2*n3-3608*n1*n5^2*d+6012*n1*d^2*n5+256*n1*n4^3-2330*n1*d^3*n5
| -2432*n5^3*d+40*n3^2*d*n1^2*n5-48*n3*n2^4*d+1536*n2*n1^2*n3+1824*n1*n2*n4^2+
| 1248*n1*n2*n3^2-1536*n5*n2^3*d+2912*n4^2*d^2-48*n1^2*n5^4-320*d*n1^3*n2^2+5576*
| d^2*n5^2+64*n3*n5^2*n4^3-784*n3^3*d+496*n1^3*n2^2+160*n5*n2^4+876*n1*n4*n5^2*d^
| 2+160*n1*n4*n3*n5^3-16*n1^4*n5*d+7456*n3*d^2*n4-4064*n1*d+2912*n1*n5+2464*n1*n4
| +2944*n1*n2+768*n1^2+2144*n1*n3-5312*n3*d+4000*n3*n5+3456*n3*n4+3680*n3*n2+1376
| *n3^2-7136*n5*d+2624*n5^2+4256*n5*n4+5088*n5*n2-6560*n2*d+128*n2^4*n4+16*n1^2*
| n2*n4^3-48*n1^3*n3*n4*d-64*n1^3*n5^2-3824*n3*d^3+712*n3^2*n5*d^2*n2+416*n1^2*n5
| *n2^2*n4+240*n1*n3*n2^2*n4^2+3408*n1*n2^2*n5+2240*n1*n3*n2^2+192*n3*n5^3*n4^2+
| 160*n2^2*n4^3+1472*n5^2*n2*n1*n3-4368*n5^2*n2*d*n3+432*n2^2*n4^2*d^2-48*n1^3*n5
| ^3-184*n5*d^5-1840*n1^2*n2^2*d-268*n1*n4^2*d^3-5744*d*n2^2*n4-4352*d*n2*n4^2+
| 140*n5*n4^3*d^2-128*n1*d*n5*n4^3+9548*n5*d^2*n4-3312*n2*n1^2*d+1904*n1*n5*n4^2+
| 64*n3^3*n4^2*n5-1630*n5*n2*n4*d^3-5440*n4*d+160*n1^3*n2*n3*n5+48*n1^3*n4^2+48*
| n1^2*n4^3+2576*n5^2*n2^2-16*d*n1*n3^2*n5^2-16*n1^4*n5^2+224*n1*n2^3*n5*n3+32*n3
| ^2*n5*n4^3+32*n1^4*n3-104*n4^3*n5^2*d+208*n5^2*n2^3*n4-7768*n1*n5*n4*d+2720*n1*
| n5^2*n4+6048*n1*n5*n4*n2-4592*n1*n2^2*d+4624*d^2-352*n5^3*n2^2*d-13992*d*n5*n4*
| n2-1192*d*n4*n5^2*n2^2-944*d*n4*n5^3*n2-16*d*n3*n4^4-680*n5*n2^2*n4^2*d+672*n1^
| 2*n2*n4*d^2-128*n3*n1^2*n5^2+80*n3*n5^2*n2^3-80*n3^2*n5^2*n1^2+16*n1*n2^2*n3^3-
| 80*n1^3*n5^2*n3-490*n2*n4^2*d^3-2864*n2*n1^2*d*n5-360*n1*d*n5^3*n4+299*n1*d^4*
| n4-936*n1^2*n2*n5*n4*d-64*d*n3^2*n4^3+314*n5^2*d^4+96*n1*n3*n2*n4^3+168*n4^2*d^
| 4+904*d^2*n5*n2*n1^2+384*n1^2*n2^2*n3*n5-624*d*n3*n2^2*n4^2+32*n3^4*n5-112*n3^3
| *n2*d*n5-12360*d*n5*n2-7200*n1*n2*d+2224*n3^2*n5+1104*n1^2*n5-1872*n1^2*d-264*
| n1^2*n2*n4^2*d+392*n1*n3^2*n4*d^2-80*n1*n3^3*n4*d+2064*n3^2*n2-3208*n3^2*d+2816
| *n3*n2^2-8824*n3*n2*d+2480*n1*n2^2+1040*n1*n3^2+8052*n2*d^2+8712*n5*d^2-80*n1^2
| *n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+4728*n2^2*d^2+521*n2*n4*d^4+496*n5*
| n2^2*n3*n4^2+1412*n1*n4^2*d^2+96*n3*n2^2*n4^3-260*d^3*n5^3+4048*n5*n2^2+4512*n5
| ^2*n2-6288*n5^2*d-4984*n1*n3*d+3328*n1*n3*n5-5264*d*n2^2+2144*n1*n5^2+5280*n1*
| n5*n2+832*n1^2*n3-6856*n1*n5*d+3296*n3*n5^2-224*d*n5*n2*n4^3+428*n1*n3*n4^2*d^2
| -80*d*n2^2*n4^3+48*n5*n2^2*n4^3+80*n1*n2^4*n5+352*n1*n4*n5^3*n2+1440*n1*n5^2*n3
| +304*n5^3*n2^2*n4+1500*n1*n3*n5*d^2*n2+192*d^2*n3^3*n4+2176*n2^2+356*n1*n3*n5^2
| *d^2+624*n2*n3*n5^2*n4^2+1712*n1^2*n2+6528*n3*n5*n2-9496*n3*n5*d+6420*n3*d^2+
| 3648*n1*n2*n3+4884*n1*d^2+592*n1^2*n2^2*d^2-1424*d*n1^2*n4*n5+80*n1^3*n4*n5+448
| *n1^2*n4^2*n2+320*n1*n3^2*n4^2+160*n1*n3^3*n4+160*n1*n3*n4^3+864*n3^2*n4^2*n5+
| 384*n5^4*n4-844*n5^2*n4*d^3+192*n1*n2*n3^2*n4^2-764*n1*n2*d^3*n3-336*n1*n2^3*d*
| n3+192*n2^2*n3^2*n4^2-1216*n5^2*d*n3^2-1144*n1*n2*d^3*n5-544*n1*n2^3*d*n5+808*
| n1*n2^2*d^2*n3-480*n5*n3^2*d*n4^2+2880*n3*n5*n4^2+1408*n1*n3*n4^2-1936*n5*d*n1^
| 2+869*n1*d^4+2320*n5*n3^2*n2+1360*n5*n2^3+16*n1*n2^2*n4^3+176*n5^2*n2^3*n1+32*
| n2*n3*n4^4-16*n2*n4^4*d-80*n3^3*n4^2*d+7744*n5*n2*n4-5896*n1*d*n4-3128*n1*n2^2*
| n4*d-488*d*n5*n4^3-5152*n1*n2*n3*n4*d+1328*n1*n2*n3*n4^2+1232*n1*n2*n3^2*n4-
| 8352*n3*d*n4-131*n3*d^5-7184*n5*n2^2*d-2676*n2*d^3*n1-76*n3^3*d^3+128*n5^3*d^2*
| n1-7152*n1*n2*n5*n4*d-7824*n1*n2*n4*d+48*n5*n2^4*n4-16*n5*n3^4*d+16*n2*n5^5-384
| *n1*n2*d*n5^3+1184*n2*n1^2*n3*n5-1928*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-384*n3^2
| *d^3*n5+448*n1^2*n2*n3*n4*n5+224*n2*n3*n5*n4^3+96*n2*n3^3*n4^2-4928*n3*n2^2*d+
| 96*n3^3*n4*n2^2+96*n3^2*n4*n2^3+7848*n3*d^2*n2+320*n1*n3*n2^2*n5^2+8332*n3*d^2*
| n5-544*n1^2*n3*n2^2*d+3872*n3*n5^2*n2-5624*n3*n5^2*d+96*n1^2*n5^3*d+48*n1*n3^3*
| n5+64*n1^2*n5^2*n4^2-1448*n1*n5^2*d*n3+3072*n1*n5*d^2*n3+16*n1*n3*n5^3*d+96*n2*
| n3^2*n4^3+2624*n1*n5^2*n2*n4-2120*d*n5^3*n4-2000*n5^2*n4^2*d-6408*n2*n5^2*n4*d-
| 420*n3*n4^2*d^3-8008*d*n5^2*n2+64*d^2*n5^2*n1^2+448*n1^2*n4^2-112*n1*n4^3*n2*d+
| 272*n2^2*n5^2*n4^2+224*n3^3*n2*n5+6604*n3*n5*d^2*n2+3552*n5*n3*n2^2+48*n1*n2^3*
| n4^2-5248*n5*d^3+32*n5^5+4128*n1*n4*n3*n5+2256*n1^2*n2*n5-5696*n1*n3*n4*d+928*
| n1^2*n3*n4-224*n4*n1^2*d^3+176*n3^2*n2^3-112*n1^2*n5^3*n3+324*n3^2*n5^2*d^2+
| 11132*n5*d^2*n2-422*d^5+128*n3*n5^4+132*n3^3*n5*d^2+32*n1^2*n5*n4^3-24*d*n1^2*
| n4^3-3752*n5*n3^2*d-1000*n3*n2^3*d-3568*d*n3^2*n2-16*n3*n1^4*d+144*n1^2*n2*n3^2
| *n4+448*n3^3*n2+16*n5^2*n2^4-10848*n3*n2*n4*d+3040*n3*n2*n4^2+3488*n3*n2^2*n4-
| 1870*n2^2*d^3+848*n1*n5^2*n4^2+224*n1*n5*n4^3-280*d*n1*n4^3+3904*n1*n2*n3*n4*n5
| +4308*n5^2*n4*d^2+1296*n3^2*n4*n5^2-2056*d*n5^3*n2+1056*n3^2*n2^2+96*n1^4+1296*
| n1*n3*n5*n4*d^2-648*n2^2*n4*d^3+152*n4^3*n3*d^2-202*n2^3*d^3-3224*n4^2*d+6740*
| n4*d^2+16*n1^5*n2+304*n1*n5*n2^2*n4^2-984*n1*n5*n2*n4^2*d+76*n1*d^2*n4^3+2448*
| n2*n4^2+324*n3*n5^3*d^2+944*n1*n5*n3^2-1456*n3*d*n1^2-2464*n1*n4^2*d-704*d*n3*
| n5^3*n4-1150*n4^2*d^3-544*n3*n2^2*d^3-1050*n3^2*d^3-147*n4*d^5-3928*n5*n2*n4^2*
| d+5240*n1*d^2*n4-256*n1^3*d*n5+384*n4^3+936*n1*d^2*n3^2-1656*n1*d^3*n3-600*d*n3
| ^2*n4*n2^2+2828*n1*n2^2*d^2+107*n1^2*d^4+84*n1^3*n4*d^2+192*n4*n5^3*n3^2+1384*
| n5^3*d^2+1088*n4*n2^3-16*n5*n1^2*n3^3-8*n2^5*d-104*n3*n4^2*n1^2*d+544*n2*n3*n5^
| 3*n4+1140*n2*n5*n4^2*d^2+276*n3*n2^3*d^2-64*n1*n2*n3^3*d-1712*n1*n3^2*d-4112*d^
| 3*n4+512*n3*n4^3+192*n3*n1^3+128*n1*n5^3*n4^2+64*n1*n5^2*n4^3+928*n1*n2^2*n4*d^
| 2+144*n1^3*n2^2*n4-64*n3^4*d+192*n1^4*n2-614*n1*n3*n4*d^3+96*n1*n5*n2*n4^3+736*
| n1^3*n2+1680*n5^2*n4^2+192*n1*n3*n2^3*n4-3816*d^3+3164*n3*d^2*n5^2-192*n5*n3*n4
| ^3*d+288*n3*n5*n2^3*n4+3232*n4*n2^2+4416*n1*n4*n2*n3-4376*n5*n4^2*d-4888*d^3*n2
| -702*d^3*n1^2+96*n3^2*n1*n5^2+1496*n1*n3*n2*n4*d^2-560*n1^2*n2^2*n4*d-1528*n1*
| n4*d*n5^2*n2-578*n1*n2^2*d^3-272*d*n4*n1^3*n2+284*n1^2*n3*n4*d^2-74*n1^3*d^3+
| 237*n3*d^4*n1+3360*n2^2*n4*d^2+2464*n1*n5*n2^2*n4+168*d^2*n2*n4^3-1440*n1*n3^2*
| n4*d+1008*n1*n3^2*n4*n5+1184*n1*n3*n4^2*n5-9800*n2*d*n4+1120*n1^2*n4+1424*n1*n4
| ^2+272*n1^3-312*d*n5^3*n4^2-3696*d*n5^2*n2*n1-3072*n3*d^3*n2+896*n3*n2^3+16*n1^
| 2*n3^3*n2-88*d*n3^2*n5^3-16*n1*n5^5-232*n1^3*n3*d+2848*n3*d^2*n2^2+6680*n3*n5*
| n4*d^2+6348*n3*n2*n4*d^2-2200*n2*n1^2*n4*d+1568*n2*n1^2*n4*n5+544*n2*n3^3*n4+
| 544*n3*n2*n4^3+32*n1^4*n4+384*d^2*n4^3+192*n1*n2^4+8*n4^4*d^2-220*n1^2*d^3*n5+
| 32*n2*n3^4+32*n5*n3^2*n2^3+304*n5^4*n2-488*n1*n5^2*n4^2*d+848*n3*n2*n5^3-304*n5
| *d*n3^3*n4-88*n3^2*n2^3*d-2172*d^3*n5^2-248*n2^4*d-32*n1^3*n3*n4*n5+1072*n3^2*
| n4*n2^2-704*n3^3*n4*d+544*n3^3*n4*n5+1216*n5*n2^2*n4^2+976*n5*n2^3*n4-1552*d*n2
| ^2*n4^2-1224*d*n2^3*n4+2600*n5*n4^2*d^2+2544*n2*n4^2*d^2+400*n5*n2*n4^3+480*n3^
| 3*n5+544*n2*n4^3-4016*n3*n5*d*n2^2+160*n1^2*n2*n3*n5^2-824*n3*n5^2*d*n1*n2+563*
| n5*n4*d^4-560*d*n3*n4^3+208*n1*n2*n4^3+208*n5*n4^2*n1^2*n2-200*n5*n4^2*n1^2*d-
| 544*n1*n5*n3^2*n4*d+64*n3^4+48*n1^3*n5^2*d+80*n3^2*n2*n1^2*n5+48*n1*n5^3*n3-672
| *n1^2*n2*n3*n4*d-3210*n5*n3*d^3-160*n1*n3^2*n4^2*d+140*n1^2*n4^2*d^2+64*n2*n1^2
| *n5^3+1392*n1*n2^2*n5^2-16*n3^4*n2*d-24*d*n1^3*n4*n5+32*n2*n3^2*n5^3+96*n3*n2^3
| *n4^2-16*n1^4*n5*n3+640*n1^3*n2*n5+240*n2^3*n4^2+2288*n3^2*n4*d^2-1232*n1*n2^3*
| d-3320*n5*n3*n4^2*d+316*n1^3*n2*d^2-170*n1*d^3*n3^2+56*n1^2*d^2*n3^2-8*n1^3*n3^
| 2*d+896*n1^2*n2^2*n4+368*n1^2*n4^2*n5-504*n1^2*n4^2*d+32*n3*n4^4+1237*d^4*n4+
| 528*n5^3*n4^2+176*n5^2*n4^3+160*n3^3*n4^2+64*n3^4*n4+128*n3^2*n4^3-6512*n3*n2*
| n1*d+3136*n1*n5^2*n2-11432*n3*d*n2*n5+656*n3*n5*n2^3+480*n1*n3^2*n2^2-976*n1^3*
| n2*d-264*n5*n4*n1^2*n3*d+288*n5*n4*n1*n2^3+428*d^2*n5*n2^3-175*n2*d^5-812*d^3*
| n5*n2^2+768*n1*n2*n3^2*n5-1440*n1*n2*n3^2*d-160*n3^3*d*n1+2208*n3*n4^2+8880*n2*
| n4*d^2+864*n1^2*n3*n2^2+5728*n1*n2*n5*d^2+132*n3^3*n2*d^2-103*n1*d^5+48*n1*n5^4
| *n4+320*n3^2*n4^2*d^2+380*n1*n2^3*d^2-576*n2*n3^2*n4^2*d+2304*n3^2*n4+4000*n5^2
| *n4+2416*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-5168*n3*n5*d*n1*n2+2088*n5*d^2
| *n3^2+1280*n1^2*n4*n5-1984*n1^2*n4*d+1792*n5^3*n4+1792*n1^2*n2*n4-672*n4^3*d+
| 688*n3^2*n5*n2^2-2240*n1*n3*d*n5*n2*n4-864*n1*n5*n4*d^3-920*n1*n2*n4*d^3-508*n5
| *n4^2*d^3-1568*n2*n3*n5*n4^2*d+1376*n2^2*n4^2-80*n1*d*n3*n4^3+1136*n5^2*n3^2+
| 6432*n3*n5*n4+6112*n3*n2*n4-10488*n5*d*n4-1824*d*n2^3+224*n2*n3^3*n4*n5-2920*n3
| *n4*d^3-3810*n5*n4*d^3-3532*n2*n4*d^3+649*n2*d^4*n5-536*d*n5*n2^3*n4+32*n4^3*n5
| ^3+2768*n3^2*d^2-1456*n3^2*d*n5*n2*n4+148*n3^2*d^4-1448*n1*d*n5*n2^2*n4+160*n2*
| n1^3*n4*n5-200*n2*n1^2*d*n3^2+2036*n3^2*d^2*n2+896*n1*n2^3*n5+4204*n5*n2^2*d^2+
| 688*n5^2*n2*n3^2+816*n5^2*n2*n1^2+8320*n5*n2*n4*d^2-504*n3^3*d*n5+544*n1*n5^3+
| 992*n1*n2^3+208*n1^3*n5+112*n1*n2*n3^3+352*n5^4+16*n1^3*n3^2+4448*n1*n3*n2*n5+
| 4288*n3*n5^2*n4+1720*d^2*n1^2-840*n1*n3*d*n5^2*n4+704*n3*n2^3*n4+1536*n2*n5^2*
| n4^2+1616*n2*n5^3*n4-32*n5*n1^2*n3^2+112*n1^3*n5^2*n2+1120*n5^3*n3-2584*d*n5*n2
| *n3^2+560*n1*n2^3*n3+1536*d^2*n5*n2^2*n4+352*n3*n5*n4^3+2080*n5^2*n2^2*n4+656*
| n1*n4*n5^3+1312*n4^2+588*n5^2*n4^2*d^2+160*n1^2*n5*d^2*n3-416*n1^3*n2*d*n5+128*
| n1^3*n3*n4*n2+424*d^2*n3^3+448*n3^2*n5*n2^2*n4-280*n1*n2^2*d*n3^2-456*d*n5^3*n2
| *n3+64*n4^2*n5^4+1748*d^4-424*n1*n2*d*n5*n3^2+176*n1*n4*n3^2*n5^2-304*d*n2*n3^3
| *n4+1000*n2*n3*n4^2*d^2-360*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5^2-728*n1^2*n5*d*n3
| *n2+236*n1*n5*d^2*n3^2+160*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+64*n1*n3*n5*n4^3+
| 544*n1*n5^2*n2^2*n4-488*n3^3*n2*d-48*n1*n5^4*n3-9536*n5*n2*n1*d+304*n1^2*n5^2+
| 416*n5*n4^3+42*d^6+2848*n2*n3*n5*n4*d^2+68*d^2*n2^4+32*n2*n4^4-450*n2*d^3*n1^2-
| 224*d*n4*n5^4+96*n1^3*n2^3+256*n1*n3*n5^2*n4^2+32*n3*n2^4*n4+8480*n3*n5*n4*n2-
| 11424*n3*n5*n4*d+128*n3*n5^4*n4+1088*n1*n5^2*n2*d^2+112*n3*n5^3*n2^2+4416*n1*n5
| *n4+3296*n1*n4*n3-2920*n1*d^3-544*d*n1^3-728*n5^2*n3*n4^2*d+96*n1*n2*n3^3*n4+80
| *n2*n5*n1^4+948*n5*n3*n4^2*d^2+208*n1^2*n3*n4^2+2560*n2*n3^2*n4*n5+544*n1^2*n3*
| n4*n5+1120*n1^2*n3*n4*n2-1032*n1^2*n3*n4*d+1140*n3*n2^2*n4*d^2-384*n3^2*d^3*n2+
| 40*n1*d^2*n3^3+1562*n5*d^4+128*n5^2*n3^3*n4+1312*n1*n4*n3^2+2624*n1*n4*n2^2+
| 6592*n2*n1*d^2+68*n1^3*d^2*n3+1792*n5^3*n2-4992*n3*d*n5^2*n4+3776*n2*n3*n4*n5^2
| -2184*n1*n5*n4^2*d-2112*n1*n2*n4^2*d-3104*n1*d*n5^2*n4-1560*n1*n3*n4^2*d-1168*
| n3^2*n4^2*d+1264*n3*n5^2*n4^2-906*d^3*n5^2*n2+16*n2^5+480*n3^3+1408*n5^3+1056*
| n2^3*d^2-608*d*n2*n4^3-864*n1^2*n2^2*n5*d+447*n3*d^4*n2+1124*n3*n5*n2^2*d^2-896
| *n2*n5^2*n4^2*d+840*n5^2*n2^2*d^2-1260*d^3*n5*n2*n3-344*d*n5*n2^3*n3+600*n1^2*d
| ^2*n3*n2-3856*n3*n4^2*d+4576*n5*n2^2*n4+3344*n5*n2*n4^2+640*n5*n3*n1^2+1408*n1^
| 2*n2^2-370*d^3*n5^2*n1+640*n3^3*n4+1056*n3^2*n4^2+160*n1*n3^3+256*n1^3*n4+192*
| n1^2*n3^2-2696*n1*n3*d*n2^2+3868*n1*n3*d^2*n2+352*n1^3*d^2-1226*n3*n2*n4*d^3-
| 648*n1^2*n5*d*n3-952*n1*n5*d*n3^2+16*n1^5+320*n1^2*n4*n5^2+96*n1^3*n4*n3-296*n1
| ^3*n4*d+432*n1^3*n4*n2+388*n1^2*n5*n4*d^2-144*d*n1^2*n4*n5^2-120*n1^4*d+176*n2*
| n5^4*n4-368*n1*d*n2^3*n4-360*n1*d*n2^2*n4^2-1768*n3*d*n5*n2^2*n4-56*n3^3*n2^2*d
| -64*d*n2^4*n4+5408*n5^2*n4*n2-7240*n5^2*n4*d-24*n1^3*n4^2*d-320*d*n1^2*n2^3+
| 4352*n1*n2*n4-304*n3*d*n2*n4^3+1440*n5^2*n3*n4*d^2+1344*n1^2*n2^2*n5+96*n1*n5^3
| *n3*n2+240*n2*n5^3*n4^2+80*n2*n5^2*n4^3+672*n2^2*n3*n4*n5^2+1469*n2*d^4-384*d*
| n5^4+2736*n3*n2*n5*n4^2+1120*n3*n2^2*n4^2+1216*n3*n5^3*n4+432*n2*n1^3*n3+320*n2
| *n1^2*n3^2-1208*n3*n5^3*d+144*n1^3*n2^2*n3-384*d*n3*n4*n2^3+32*n4^4-168*d*n5^4*
| n2+240*n1^2*n5*n2^3+48*n2^2*n5^4+64*n1^2*n3*n4^2*n5+848*n1^2*d^2*n3+584*n5^3*n2
| *d^2+406*n1*n2*d^4-832*n5^2*n2^2*n1*d-688*n5^2*n2^2*d*n3+36*n1^4*d^2+1536*n1*n5
| ^2*n3*n4-4648*n1*n5*n3*n4*d-2168*n2*n3*d*n5^2*n4-588*n3*n5^2*d^3-164*n3*d^3*n1^
| 2+1876*n4*d^2*n5^2*n2+337*n1*d^4*n5+980*n5*n4*n3^2*d^2+448*n3^2*n2*n5*n4^2+624*
| n1*n2^3*n4+640*n1*n2^2*n4^2+1728*n1*n2^2*n3*n4-3448*n5*n3^2*n4*d+1696*n5*n1*n4^
| 2*n2-5336*d*n5*n2^2*n4-4008*d*n3*n4*n2^2+3136*n3*n5*n2^2*n4-3504*n3*n2*n4^2*d+
| 1160*n1^2*n4*d^2-2052*n1*d^3*n4+3252*n1*n3*n4*d^2+4508*n1*n5*n4*d^2+4660*n1*n2*
| n4*d^2-32*n4^4*d+1024*n3^2*n2*n4^2-9880*n5*n2*n3*n4*d-3384*d*n2*n3^2*n4-562*n3*
| d^3*n1*n5+424*n3*n4*d^4+160*n1^2*n3^2*n4-704*n1*n2*n3^2*n4*d+512*n1*n2*n3^2*n4*
| n5-1008*n1*d*n3*n4*n2^2+640*n5^3*n2^2+128*n1*n3^2*n4^2*n5+624*n1*n5*n4^2*d^2+
| 608*n1*n2*n4^2*d^2-744*n5^2*n3^2*n4*d-656*n1*n3*n5*n4^2*d-48*n1^3*n4*n5^2+112*
| n3^3*n2^2+1856*n1*n2^2*n5*n3-4144*n1*n2^2*n5*d+16*d^2*n3^4+24*n1^3*n3*n5*d+48*
| n5^3*n2^3+144*n1^2*n2^3*n4+48*n1*n2^4*n4-432*n4*d^3*n3^2+96*n1^2*n2^2*n4^2+544*
| n2*n4*n3^2*n5^2-752*n1*n3*n2*n4^2*d+48*n1*n5^2*n3^2*n2-16*n1*n5^2*n3^3+608*n1*
| n3*n2*n5*n4^2+1220*n3*n5^2*d^2*n2+64*n1^2*n2^4-208*n3^2*d*n1^2-1176*n3^2*d*n2^2
| -128*n1^2*n5^3+2216*n3*n4^2*d^2+1256*d^2*n5*n2^2*n1+2100*n5*n1*n4*n2*d^2-16*n4*
| n1^2*n5^3-16*n1*n5*n3^3*d-16*n1*n5^4+288*n1^2*n3*n4*n2^2+496*n1^2*n2^3+16*n1*n2
| ^5+964*n3^2*n2*n4*d^2+48*n1*n2^4*n3-80*d*n5*n2^4+240*n1^3*n2^2*n5-360*d*n5^2*n2
| *n3^2+64*n1*n3^3*n4*n5-56*n5^2*n3^3*d+672*n5^3*n2*n1+32*n2*n3^4*n4-16*n1^4*n4*d
| +48*n1^4*n4*n2-16*n1^4*n4*n5-32*n3^4*n4*d+32*n3^4*n4*n5-16*n5*n1^3*n3-120*n1^4*
| n2*d+800*n1*n4*n3*n5^2*n2-272*n2*n1^3*n3*d-1288*n5*n3*n4*d^3+288*n5^2*n2^2*n1^2
| +4688*n5^2*n2*d^2+1040*n2^3+224*n2^4+324*n3^2*n2^2*d^2-32*n3^2*n5*n1^3+459*n3*d
| ^4*n5+144*n5*n1*n3^2*n2^2+76*n1^3*d^2*n5+96*n2^2*n1^2*n3^2+96*n3*n2^4-288*n1^2*
| n5^2*d-536*n1*n5^3*d+2008*n1*n5^2*d^2+1132*n1^2*d^2*n5+64*n1^4*n2^2-16*n5^5*d+
| 176*n3^2*n5^3+120*d*n1^2*n3*n5^2+112*n3^3*n5^2+32*n5^5*n4+192*n3^2*n4^2*n5^2-64
| *n3*n5^4*d+48*n3*n5^4*n2+400*n1*n4^2*n5^2*n2-4410*n2*d^3*n5+1280*n5^2*n2^2*n3-
| 2960*n5^2*n2^2*d+2124*n2*n1^2*d^2)
""".stripMargin)
val b4 = ring(
"""
| (-44*d*n5^2*n2*n1^2-4*d^2*n2^3*n4+8
| *n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-12*d^2*n5^3*n4-4*n5
| ^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*n5-40*n1*d^3*n5+32*
| n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3*d^2*n4-16*n1*d+32*
| n1*n5-32*n1*n4+32*n1*n2+32*n1^2-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+2*n3)
""".stripMargin)
val a4 = ring(
"""
| (4*n1^2+4*n1+4*n1*n2-4*n1*d+4*n1*n5+4*n1*n4+n3*d-2*n3*n5-2*n3*
| n4-2*n3*n2)
""".stripMargin)
val a5 = ring(
"""
| (768-84*
| d^3*n4^3+1344*n1+2496*n2+1344*n3+1728*n4+2304*n5-2944*d-448*d*n5^2*n2^3+373*n2^
| 2*d^4-480*d*n5^2*n2*n1^2+788*d^2*n2^3*n4+848*n5^2*n2^3+48*n1^3*n2*n4^2+64*n1*n5
| ^4*n2+32*n3*n2^4*n5+4736*n4*n2+864*n1*n3*n5*n2^2*n4+881*d^4*n3-72*n1*n2^4*d-752
| *n1*n2^2*n5*d*n3+256*n1*n3^2*d^2*n2+32*n3^2*n2^2*n5^2+16*n1^4*n5+1888*n3^2*n4*
| n5+2144*n3^2*n4*n2+96*n2^3*n4^3+504*d^2*n5^3*n4-48*n5^4*d*n1-2528*n3^2*n4*d-
| 4400*n1*n5*d*n3+3392*n1*d^2*n3-4232*n1*n5^2*d+6380*n1*d^2*n5+320*n1*n4^3-2470*
| n1*d^3*n5-2432*n5^3*d-16*n3^2*d*n1^2*n5-72*n3*n2^4*d+992*n2*n1^2*n3+2528*n1*n2*
| n4^2+864*n1*n2*n3^2-2504*n5*n2^3*d+2944*n4^2*d^2-72*d*n1^3*n2^2+5576*d^2*n5^2+
| 32*n3*n5^2*n4^3-448*n3^3*d+144*n1^3*n2^2+304*n5*n2^4+792*n1*n4*n5^2*d^2+96*n1*
| n4*n3*n5^3-8*n1^4*n5*d+5648*n3*d^2*n4-4128*n1*d+3040*n1*n5+2336*n1*n4+3552*n1*
| n2+896*n1^2+1664*n1*n3-4128*n3*d+3040*n3*n5+2592*n3*n4+3296*n3*n2+896*n3^2-7136
| *n5*d+2624*n5^2+4128*n5*n4+6048*n5*n2-7744*n2*d+448*n2^4*n4+48*n1^2*n2*n4^3-32*
| n1^3*n3*n4*d+64*n1^3*n5^2-2984*n3*d^3+504*n3^2*n5*d^2*n2+432*n1^2*n5*n2^2*n4+
| 384*n1*n3*n2^2*n4^2+4304*n1*n2^2*n5+1984*n1*n3*n2^2+96*n3*n5^3*n4^2+512*n2^2*n4
| ^3+1184*n5^2*n2*n1*n3-3672*n5^2*n2*d*n3+944*n2^2*n4^2*d^2-184*n5*d^5-1312*n1^2*
| n2^2*d-292*n1*n4^2*d^3-8752*d*n2^2*n4-5680*d*n2*n4^2+164*n5*n4^3*d^2-128*n1*d*
| n5*n4^3+9180*n5*d^2*n4-3200*n2*n1^2*d+1808*n1*n5*n4^2+32*n3^3*n4^2*n5-1976*n5*
| n2*n4*d^3-5376*n4*d+32*n1^3*n2*n3*n5+48*n1^3*n4^2+64*n1^2*n4^3+3600*n5^2*n2^2-
| 64*d*n1*n3^2*n5^2+96*n1*n2^3*n5*n3-8*n1*n4^4*d+16*n3^2*n5*n4^3-96*n4^3*n5^2*d+
| 480*n5^2*n2^3*n4-8*d*n5*n4^4-7288*n1*n5*n4*d+2432*n1*n5^2*n4+6912*n1*n5*n4*n2-
| 5712*n1*n2^2*d+4624*d^2-480*n5^3*n2^2*d-16560*d*n5*n4*n2-1872*d*n4*n5^2*n2^2-
| 992*d*n4*n5^3*n2-8*d*n3*n4^4-1504*n5*n2^2*n4^2*d+676*n1^2*n2*n4*d^2+128*n3*n1^2
| *n5^2+96*n3*n5^2*n2^3-692*n2*n4^2*d^3-2600*n2*n1^2*d*n5-296*n1*d*n5^3*n4+299*n1
| *d^4*n4-920*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+314*n5^2*d^4+96*n1*n3*n2*n4^3+177*n4
| ^2*d^4+728*d^2*n5*n2*n1^2+96*n1^2*n2^2*n3*n5-864*d*n3*n2^2*n4^2+16*n3^4*n5-72*
| n3^3*n2*d*n5-14616*d*n5*n2-8504*n1*n2*d+1424*n3^2*n5+1424*n1^2*n5-2096*n1^2*d-
| 368*n1^2*n2*n4^2*d+264*n1*n3^2*n4*d^2-48*n1*n3^3*n4*d+1536*n3^2*n2-2096*n3^2*d+
| 2896*n3*n2^2-7896*n3*n2*d+3280*n1*n2^2+688*n1*n3^2+9476*n2*d^2+8712*n5*d^2-56*
| n1^2*n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+6512*n2^2*d^2+646*n2*n4*d^4+672*
| n5*n2^2*n3*n4^2+1500*n1*n4^2*d^2+144*n3*n2^2*n4^3-260*d^3*n5^3+5680*n5*n2^2+
| 5344*n5^2*n2-6288*n5^2*d-3904*n1*n3*d+2592*n1*n3*n5-7304*d*n2^2+2464*n1*n5^2+
| 6336*n1*n5*n2+688*n1^2*n3-7240*n1*n5*d+2464*n3*n5^2-408*d*n5*n2*n4^3+344*n1*n3*
| n4^2*d^2-312*d*n2^2*n4^3+240*n5*n2^2*n4^3+16*n2*n1*n4^4+32*n1*n2^4*n5+352*n1*n4
| *n5^3*n2+1280*n1*n5^2*n3+448*n5^3*n2^2*n4+1140*n1*n3*n5*d^2*n2+108*d^2*n3^3*n4+
| 3040*n2^2+368*n1*n3*n5^2*d^2+512*n2*n3*n5^2*n4^2+1856*n1^2*n2+5696*n3*n5*n2-
| 7240*n3*n5*d+4996*n3*d^2+3200*n1*n2*n3+4996*n1*d^2+360*n1^2*n2^2*d^2-1408*d*n1^
| 2*n4*n5+112*n1^3*n4*n5+624*n1^2*n4^2*n2+208*n1*n3^2*n4^2+96*n1*n3^3*n4+128*n1*
| n3*n4^3+512*n3^2*n4^2*n5+272*n5^4*n4-766*n5^2*n4*d^3+144*n1*n2*n3^2*n4^2-598*n1
| *n2*d^3*n3-192*n1*n2^3*d*n3+192*n2^2*n3^2*n4^2-776*n5^2*d*n3^2-1230*n1*n2*d^3*
| n5-512*n1*n2^3*d*n5+16*n2*n5*n4^4+608*n1*n2^2*d^2*n3-280*n5*n3^2*d*n4^2+2064*n3
| *n5*n4^2+1088*n1*n3*n4^2-2416*n5*d*n1^2+881*n1*d^4+1664*n5*n3^2*n2+2240*n5*n2^3
| +144*n1*n2^2*n4^3+160*n5^2*n2^3*n1+16*n2*n3*n4^4-40*n2*n4^4*d-40*n3^3*n4^2*d+
| 9120*n5*n2*n4-5672*n1*d*n4-4704*n1*n2^2*n4*d-568*d*n5*n4^3-4752*n1*n2*n3*n4*d+
| 1312*n1*n2*n3*n4^2+944*n1*n2*n3^2*n4-6280*n3*d*n4-103*n3*d^5-9992*n5*n2^2*d-
| 2952*n2*d^3*n1-44*n3^3*d^3+244*n5^3*d^2*n1-8216*n1*n2*n5*n4*d-9328*n1*n2*n4*d+
| 208*n5*n2^4*n4-8*n5*n3^4*d+16*n2*n5^5-496*n1*n2*d*n5^3+656*n2*n1^2*n3*n5-1088*
| n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-250*n3^2*d^3*n5+336*n1^2*n2*n3*n4*n5+176*n2*n3
| *n5*n4^3+48*n2*n3^3*n4^2-5072*n3*n2^2*d+80*n3^3*n4*n2^2+144*n3^2*n4*n2^3+7016*
| n3*d^2*n2+192*n1*n3*n2^2*n5^2+6380*n3*d^2*n5-168*n1^2*n3*n2^2*d+3264*n3*n5^2*n2
| -4232*n3*n5^2*d-56*n1^2*n5^3*d+32*n1*n3^3*n5+32*n1^2*n5^2*n4^2-1376*n1*n5^2*d*
| n3+2464*n1*n5*d^2*n3-96*n1*n3*n5^3*d+48*n2*n3^2*n4^3+2848*n1*n5^2*n2*n4-1752*d*
| n5^3*n4-1824*n5^2*n4^2*d-7312*n2*n5^2*n4*d-316*n3*n4^2*d^3-9400*d*n5^2*n2+208*d
| ^2*n5^2*n1^2+480*n1^2*n4^2-256*n1*n4^3*n2*d+576*n2^2*n5^2*n4^2+144*n3^3*n2*n5+
| 5748*n3*n5*d^2*n2+3536*n5*n3*n2^2+240*n1*n2^3*n4^2-5248*n5*d^3+32*n5^5+3008*n1*
| n4*n3*n5+2304*n1^2*n2*n5-4384*n1*n3*n4*d+736*n1^2*n3*n4-218*n4*n1^2*d^3+160*n3^
| 2*n2^3+208*n3^2*n5^2*d^2+13084*n5*d^2*n2-422*d^5+96*n3*n5^4+76*n3^3*n5*d^2+16*
| n1^2*n5*n4^3-32*d*n1^2*n4^3-2416*n5*n3^2*d-1216*n3*n2^3*d-2640*d*n3^2*n2+96*n1^
| 2*n2*n3^2*n4+288*n3^3*n2+32*n5^2*n2^4-9744*n3*n2*n4*d+2656*n3*n2*n4^2+3936*n3*
| n2^2*n4-2556*n2^2*d^3+672*n1*n5^2*n4^2+240*n1*n5*n4^3-368*d*n1*n4^3+3360*n1*n2*
| n3*n4*n5+3920*n5^2*n4*d^2+768*n3^2*n4*n5^2-2360*d*n5^3*n2+864*n3^2*n2^2+32*n1^4
| +964*n1*n3*n5*n4*d^2-1056*n2^2*n4*d^3+104*n4^3*n3*d^2-320*n2^3*d^3-3224*n4^2*d+
| 6628*n4*d^2+672*n1*n5*n2^2*n4^2-1320*n1*n5*n2*n4^2*d+104*n1*d^2*n4^3+3104*n2*n4
| ^2+244*n3*n5^3*d^2+624*n1*n5*n3^2-1136*n3*d*n1^2-2544*n1*n4^2*d-432*d*n3*n5^3*
| n4+16*n5*n4^4-1184*n4^2*d^3-560*n3*n2^2*d^3-692*n3^2*d^3-147*n4*d^5-5272*n5*n2*
| n4^2*d+5112*n1*d^2*n4-288*n1^3*d*n5+384*n4^3+620*n1*d^2*n3^2-1296*n1*d^3*n3-592
| *d*n3^2*n4*n2^2+3284*n1*n2^2*d^2+98*n1^2*d^4+68*n1^3*n4*d^2+96*n4*n5^3*n3^2+
| 1384*n5^3*d^2+2208*n4*n2^3-16*n2^5*d-88*n3*n4^2*n1^2*d+416*n2*n3*n5^3*n4+1576*
| n2*n5*n4^2*d^2+336*n3*n2^3*d^2-32*n1*n2*n3^3*d-1136*n1*n3^2*d-4048*d^3*n4+320*
| n3*n4^3+96*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*n4^3+1396*n1*n2^2*n4*d^2+80*n1^3*
| n2^2*n4-32*n3^4*d+32*n1^4*n2-486*n1*n3*n4*d^3+176*n1*n5*n2*n4^3+416*n1^3*n2+
| 1552*n5^2*n4^2+288*n1*n3*n2^3*n4-3816*d^3+2396*n3*d^2*n5^2-128*n5*n3*n4^3*d+528
| *n3*n5*n2^3*n4+4800*n4*n2^2+4032*n1*n4*n2*n3-4376*n5*n4^2*d-5728*d^3*n2-692*d^3
| *n1^2+128*n3^2*n1*n5^2+1392*n1*n3*n2*n4*d^2-592*n1^2*n2^2*n4*d-1664*n1*n4*d*n5^
| 2*n2-624*n1*n2^2*d^3-176*d*n4*n1^3*n2+224*n1^2*n3*n4*d^2-44*n1^3*d^3+184*n3*d^4
| *n1+5284*n2^2*n4*d^2+3600*n1*n5*n2^2*n4+292*d^2*n2*n4^3-960*n1*n3^2*n4*d+624*n1
| *n3^2*n4*n5+832*n1*n3*n4^2*n5-11648*n2*d*n4+1120*n1^2*n4+1424*n1*n4^2+272*n1^3-
| 224*d*n5^3*n4^2+32*n2^2*n4^4-4368*d*n5^2*n2*n1-2744*n3*d^3*n2+1088*n3*n2^3-56*d
| *n3^2*n5^3-96*n1^3*n3*d+2932*n3*d^2*n2^2+4960*n3*n5*n4*d^2+5812*n3*n2*n4*d^2-
| 2304*n2*n1^2*n4*d+1584*n2*n1^2*n4*n5+336*n2*n3^3*n4+432*n3*n2*n4^3+16*n1*n4^4+
| 16*n1^4*n4+424*d^2*n4^3+144*n1*n2^4+12*n4^4*d^2-250*n1^2*d^3*n5+16*n2*n3^4+16*
| n5*n3^2*n2^3+336*n5^4*n2-368*n1*n5^2*n4^2*d+672*n3*n2*n5^3-168*n5*d*n3^3*n4-80*
| n3^2*n2^3*d-2172*d^3*n5^2-456*n2^4*d+1008*n3^2*n4*n2^2-392*n3^3*n4*d+304*n3^3*
| n4*n5+2496*n5*n2^2*n4^2+2128*n5*n2^3*n4-3120*d*n2^2*n4^2-2648*d*n2^3*n4+2612*n5
| *n4^2*d^2+3444*n2*n4^2*d^2+688*n5*n2*n4^3+272*n3^3*n5+800*n2*n4^3-4008*n3*n5*d*
| n2^2+96*n1^2*n2*n3*n5^2-640*n3*n5^2*d*n1*n2+545*n5*n4*d^4-368*d*n3*n4^3+432*n1*
| n2*n4^3+240*n5*n4^2*n1^2*n2-168*n5*n4^2*n1^2*d-336*n1*n5*n3^2*n4*d+32*n3^4-32*
| n1^3*n5^2*d+16*n3^2*n2*n1^2*n5+192*n1*n5^3*n3-528*n1^2*n2*n3*n4*d-2470*n5*n3*d^
| 3-104*n1*n3^2*n4^2*d+152*n1^2*n4^2*d^2+96*n2*n1^2*n5^3+1696*n1*n2^2*n5^2-8*n3^4
| *n2*d-56*d*n1^3*n4*n5+16*n2*n3^2*n5^3+240*n3*n2^3*n4^2+336*n1^3*n2*n5+864*n2^3*
| n4^2+1464*n3^2*n4*d^2-1344*n1*n2^3*d-2392*n5*n3*n4^2*d+124*n1^3*n2*d^2-112*n1*d
| ^3*n3^2+32*n1^2*d^2*n3^2+1008*n1^2*n2^2*n4+320*n1^2*n4^2*n5-544*n1^2*n4^2*d+16*
| n3*n4^4+1225*d^4*n4+400*n5^3*n4^2+176*n5^2*n4^3+80*n3^3*n4^2+32*n3^4*n4+64*n3^2
| *n4^3-5536*n3*n2*n1*d+3840*n1*n5^2*n2-9960*n3*d*n2*n5+784*n3*n5*n2^3+272*n1*n3^
| 2*n2^2-456*n1^3*n2*d-224*n5*n4*n1^2*n3*d+528*n5*n4*n1*n2^3+692*d^2*n5*n2^3-203*
| n2*d^5-1110*d^3*n5*n2^2+464*n1*n2*n3^2*n5-944*n1*n2*n3^2*d-96*n3^3*d*n1+1552*n3
| *n4^2+10656*n2*n4*d^2+336*n1^2*n3*n2^2+6432*n1*n2*n5*d^2+84*n3^3*n2*d^2-103*n1*
| d^5+32*n1*n5^4*n4+192*n3^2*n4^2*d^2+368*n1*n2^3*d^2-400*n2*n3^2*n4^2*d+1440*n3^
| 2*n4+3680*n5^2*n4+2416*n5*n4^2+432*n5*n2^3*n4^2-520*d*n2^3*n4^2-4096*n3*n5*d*n1
| *n2+1352*n5*d^2*n3^2+1248*n1^2*n4*n5-1968*n1^2*n4*d+1504*n5^3*n4+1952*n1^2*n2*
| n4-704*n4^3*d+512*n3^2*n5*n2^2-1952*n1*n3*d*n5*n2*n4-828*n1*n5*n4*d^3-1108*n1*
| n2*n4*d^3-514*n5*n4^2*d^3-1416*n2*n3*n5*n4^2*d+2560*n2^2*n4^2-64*n1*d*n3*n4^3+
| 720*n5^2*n3^2+4736*n3*n5*n4+5408*n3*n2*n4-10104*n5*d*n4-2944*d*n2^3+144*n2*n3^3
| *n4*n5-2236*n3*n4*d^3-3670*n5*n4*d^3-4300*n2*n4*d^3+753*n2*d^4*n5-1256*d*n5*n2^
| 3*n4+16*n4^3*n5^3+1816*n3^2*d^2-1080*n3^2*d*n5*n2*n4+98*n3^2*d^4-2120*n1*d*n5*
| n2^2*n4+112*n2*n1^3*n4*n5-56*n2*n1^2*d*n3^2+1500*n3^2*d^2*n2+976*n1*n2^3*n5+
| 5796*n5*n2^2*d^2+464*n5^2*n2*n3^2+864*n5^2*n2*n1^2+9944*n5*n2*n4*d^2-288*n3^3*d
| *n5+832*n1*n5^3+1216*n1*n2^3+272*n1^3*n5+64*n1*n2*n3^3+352*n5^4+3648*n1*n3*n2*
| n5+3008*n3*n5^2*n4+1816*d^2*n1^2-576*n1*n3*d*n5^2*n4+1168*n3*n2^3*n4+1920*n2*n5
| ^2*n4^2+1696*n2*n5^3*n4+32*n5*n1^2*n3^2+64*n1^3*n5^2*n2+832*n5^3*n3-1840*d*n5*
| n2*n3^2+384*n1*n2^3*n3+2488*d^2*n5*n2^2*n4+240*n3*n5*n4^3+3168*n5^2*n2^2*n4+544
| *n1*n4*n5^3+1312*n4^2+528*n5^2*n4^2*d^2+172*n1^2*n5*d^2*n3-184*n1^3*n2*d*n5+64*
| n1^3*n3*n4*n2+244*d^2*n3^3+432*n3^2*n5*n2^2*n4-136*n1*n2^2*d*n3^2-360*d*n5^3*n2
| *n3+32*n4^2*n5^4+1748*d^4-240*n1*n2*d*n5*n3^2+96*n1*n4*n3^2*n5^2-192*d*n2*n3^3*
| n4+940*n2*n3*n4^2*d^2-264*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5^2-352*n1^2*n5*d*n3*
| n2+172*n1*n5*d^2*n3^2+192*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+32*n1*n3*n5*n4^3+768
| *n1*n5^2*n2^2*n4-312*n3^3*n2*d-11112*n5*n2*n1*d+720*n1^2*n5^2+480*n5*n4^3+42*d^
| 6+2576*n2*n3*n5*n4*d^2+124*d^2*n2^4+64*n2*n4^4-344*n2*d^3*n1^2-152*d*n4*n5^4+
| 128*n1*n3*n5^2*n4^2+112*n3*n2^4*n4+7424*n3*n5*n4*n2-8440*n3*n5*n4*d+64*n3*n5^4*
| n4+1232*n1*n5^2*n2*d^2+96*n3*n5^3*n2^2+4096*n1*n5*n4+2496*n1*n4*n3-2984*n1*d^3-
| 448*d*n1^3-464*n5^2*n3*n4^2*d+64*n1*n2*n3^3*n4+16*n2*n5*n1^4+684*n5*n3*n4^2*d^2
| +176*n1^2*n3*n4^2+1872*n2*n3^2*n4*n5+432*n1^2*n3*n4*n5+912*n1^2*n3*n4*n2-816*n1
| ^2*n3*n4*d+1396*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+24*n1*d^2*n3^3+1562*n5*d^4+64*n5
| ^2*n3^3*n4+864*n1*n4*n3^2+3936*n1*n4*n2^2+7552*n2*n1*d^2+24*n1^3*d^2*n3+2080*n5
| ^3*n2-3488*n3*d*n5^2*n4+3168*n2*n3*n4*n5^2-2088*n1*n5*n4^2*d-3040*n1*n2*n4^2*d-
| 2792*n1*d*n5^2*n4-1232*n1*n3*n4^2*d-688*n3^2*n4^2*d+832*n3*n5^2*n4^2-1046*d^3*
| n5^2*n2+32*n2^5+272*n3^3+1408*n5^3+1688*n2^3*d^2-968*d*n2*n4^3-536*n1^2*n2^2*n5
| *d+399*n3*d^4*n2+1124*n3*n5*n2^2*d^2-1136*n2*n5^2*n4^2*d+1152*n5^2*n2^2*d^2-
| 1096*d^3*n5*n2*n3-416*d*n5*n2^3*n3+296*n1^2*d^2*n3*n2-2768*n3*n4^2*d+6976*n5*n2
| ^2*n4+4384*n5*n2*n4^2+624*n5*n3*n1^2+1184*n1^2*n2^2-448*d^3*n5^2*n1+352*n3^3*n4
| +608*n3^2*n4^2+96*n1*n3^3+224*n1^3*n4+128*n1^2*n3^2-2208*n1*n3*d*n2^2+3164*n1*
| n3*d^2*n2+244*n1^3*d^2-1148*n3*n2*n4*d^3-656*n1^2*n5*d*n3-656*n1*n5*d*n3^2+368*
| n1^2*n4*n5^2+64*n1^3*n4*n3-248*n1^3*n4*d+304*n1^3*n4*n2+392*n1^2*n5*n4*d^2-192*
| d*n1^2*n4*n5^2-32*n1^4*d+160*n2*n5^4*n4-688*n1*d*n2^3*n4-864*n1*d*n2^2*n4^2-
| 2120*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-264*d*n2^4*n4+6144*n5^2*n4*n2-6616*n5^2*n4*
| d-24*n1^3*n4^2*d-112*d*n1^2*n2^3+5152*n1*n2*n4-256*n3*d*n2*n4^3+1000*n5^2*n3*n4
| *d^2+992*n1^2*n2^2*n5+96*n1*n5^3*n3*n2+256*n2*n5^3*n4^2+128*n2*n5^2*n4^3+768*n2
| ^2*n3*n4*n5^2+1713*n2*d^4-384*d*n5^4+2416*n3*n2*n5*n4^2+1440*n3*n2^2*n4^2+768*
| n3*n5^3*n4+96*n2*n1^3*n3+112*n2*n1^2*n3^2-904*n3*n5^3*d-688*d*n3*n4*n2^3+32*n4^
| 4-184*d*n5^4*n2+80*n1^2*n5*n2^3+64*n2^2*n5^4+32*n1^2*n3*n4^2*n5+620*n1^2*d^2*n3
| +664*n5^3*n2*d^2+429*n1*n2*d^4-928*n5^2*n2^2*n1*d-656*n5^2*n2^2*d*n3+8*n1^4*d^2
| +1056*n1*n5^2*n3*n4-3424*n1*n5*n3*n4*d-1840*n2*n3*d*n5^2*n4-448*n3*n5^2*d^3-112
| *n3*d^3*n1^2+2160*n4*d^2*n5^2*n2+355*n1*d^4*n5+616*n5*n4*n3^2*d^2+304*n3^2*n2*
| n5*n4^2+1168*n1*n2^3*n4+1440*n1*n2^2*n4^2+2016*n1*n2^2*n3*n4-2168*n5*n3^2*n4*d+
| 2224*n5*n1*n4^2*n2-8360*d*n5*n2^2*n4-4704*d*n3*n4*n2^2+3600*n3*n5*n2^2*n4-3168*
| n3*n2*n4^2*d+1140*n1^2*n4*d^2-2028*n1*d^3*n4+2540*n1*n3*n4*d^2+4276*n1*n5*n4*d^
| 2+5588*n1*n2*n4*d^2-40*n4^4*d+688*n3^2*n2*n4^2-8776*n5*n2*n3*n4*d-2512*d*n2*n3^
| 2*n4-456*n3*d^3*n1*n5+329*n3*n4*d^4+112*n1^2*n3^2*n4-544*n1*n2*n3^2*n4*d+368*n1
| *n2*n3^2*n4*n5-1184*n1*d*n3*n4*n2^2+880*n5^3*n2^2+64*n1*n3^2*n4^2*n5+596*n1*n5*
| n4^2*d^2+908*n1*n2*n4^2*d^2-432*n5^2*n3^2*n4*d+32*n1^2*n5^2*n3*n4-448*n1*n3*n5*
| n4^2*d+80*n3^3*n2^2+32*n4*n2^5+1408*n1*n2^2*n5*n3-4872*n1*n2^2*n5*d+8*d^2*n3^4-
| 16*n1^3*n3*n5*d+80*n5^3*n2^3+144*n1^2*n2^3*n4+112*n1*n2^4*n4-280*n4*d^3*n3^2+
| 192*n1^2*n2^2*n4^2+384*n2*n4*n3^2*n5^2-768*n1*n3*n2*n4^2*d+32*n1*n5^2*n3^2*n2+
| 544*n1*n3*n2*n5*n4^2+96*n2^4*n4^2+1024*n3*n5^2*d^2*n2-128*n3^2*d*n1^2-960*n3^2*
| d*n2^2+112*n1^2*n5^3+1628*n3*n4^2*d^2+1364*d^2*n5*n2^2*n1+2424*n5*n1*n4*n2*d^2+
| 16*n4*n1^2*n5^3-16*n1*n5*n3^3*d+96*n1*n5^4+240*n1^2*n3*n4*n2^2+224*n1^2*n2^3+
| 732*n3^2*n2*n4*d^2-152*d*n5*n2^4+64*n1^3*n2^2*n5-240*d*n5^2*n2*n3^2+32*n1*n3^3*
| n4*n5-32*n5^2*n3^3*d+896*n5^3*n2*n1+16*n2*n3^4*n4-8*n1^4*n4*d+16*n1^4*n4*n2-16*
| n3^4*n4*d+16*n3^4*n4*n5+32*n5*n1^3*n3-16*n1^4*n2*d+640*n1*n4*n3*n5^2*n2-48*n2*
| n1^3*n3*d-962*n5*n3*n4*d^3+192*n5^2*n2^2*n1^2+5456*n5^2*n2*d^2+1696*n2^3+416*n2
| ^4+264*n3^2*n2^2*d^2+355*n3*d^4*n5+32*n5*n1*n3^2*n2^2+76*n1^3*d^2*n5+144*n3*n2^
| 4-776*n1^2*n5^2*d-904*n1*n5^3*d+2396*n1*n5^2*d^2+1352*n1^2*d^2*n5-16*n5^5*d+112
| *n3^2*n5^3-64*d*n1^2*n3*n5^2+64*n3^3*n5^2+16*n5^5*n4+96*n3^2*n4^2*n5^2-48*n3*n5
| ^4*d+32*n3*n5^4*n2+448*n1*n4^2*n5^2*n2-5150*n2*d^3*n5+1216*n5^2*n2^2*n3-4096*n5
| ^2*n2^2*d+1824*n2*n1^2*d^2)
""".stripMargin)
val a6 = ring(
"""
| (-44*d*n5^2*n2*n1^2-4*d^2*n2^3*n4+8*n1*n5^4*n2-32*
| n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-12*d^2*n5^3*n4-4*n5^4*d*n1-36*n1*
| n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*n5-40*n1*d^3*n5+32*n2*n1^2*n3-32*
| n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3*d^2*n4-16*n1*d+32*n1*n5-32*n1*n4
| +32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16*n1^2*n5*n2^2*n4+104*n1*n2^2*n5+24*n1*
| n3*n2^2+40*n5^2*n2*n1*n3-8*n2^2*n4^2*d^2-32*n1^2*n2^2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n1*d+64*n1*n5^2*n2+48*n3*d*n2*n5-64*n3
| *n4^2-28*n2*n4*d^2-32*n3^2*n4-64*n5^2*n4-64*n5*n4^2+8*n1^2*n4*n5-4*n1^2*n4*d-24
| *n5^3*n4+24*n1^2*n2*n4+12*n4^3*d-16*n5^2*n3^2-96*n3*n5*n4-80*n3*n2*n4+96*n5*d*
| n4-8*n3^2*d^2+16*n1*n5^3+32*n1*n2^3+48*n1^3*n5+40*n1*n3*n2*n5-64*n3*n5^2*n4+44*
| d^2*n1^2-8*n5^3*n3-120*n5*n2*n1*d+48*n1^2*n5^2-24*n5*n4^3-104*n3*n5*n4*n2+112*
| n3*n5*n4*d-64*n1*n5*n4-32*n1*n4*n3-12*n1*d^3-48*d*n1^3-16*n1*n4*n3^2+8*n1*n4*n2
| ^2+52*n2*n1*d^2+72*n3*n4^2*d-24*n5*n2^2*n4-48*n5*n2*n4^2+56*n5*n3*n1^2+80*n1^2*
| n2^2-8*n3^3*n4-32*n3^2*n4^2+16*n1^3*n4+16*n1^2*n3^2-48*n5^2*n4*n2+68*n5^2*n4*d-
| 32*n1*n2*n4)
""".stripMargin)
val a8 = ring(
"""
| (384+96
| *n1^4*n2*n3-42*d^3*n4^3+1248*n1+1632*n2+864*n3+864*n4+1728*n5-1760*d-520*d*n5^2
| *n2^3+373*n2^2*d^4-2224*d*n5^2*n2*n1^2+392*d^2*n2^3*n4+96*n1^3*n2*n3^2+976*n5^2
| *n2^3+96*n1^3*n2*n4^2+256*n1*n5^4*n2+32*n3*n2^4*n5+2720*n4*n2+864*n1*n3*n5*n2^2
| *n4+831*d^4*n3+48*n1*n5^3*n3^2-264*n1*n2^4*d+96*n1*n3^2*n2^3-2096*n1*n2^2*n5*d*
| n3+520*n1*n3^2*d^2*n2+32*n3^2*n2^2*n5^2+256*n1^4*n5+1600*n3^2*n4*n5+1568*n3^2*
| n4*n2-16*n1^5*d+508*d^2*n5^3*n4+288*n1^2*n2^3*n3-216*n5^4*d*n1-2048*n3^2*n4*d-
| 7832*n1*n5*d*n3+4692*n1*d^2*n3-8872*n1*n5^2*d+10716*n1*d^2*n5+176*n1*n4^3-4498*
| n1*d^3*n5-3520*n5^3*d-256*n3^2*d*n1^2*n5-72*n3*n2^4*d+3072*n2*n1^2*n3+1632*n1*
| n2*n4^2+1344*n1*n2*n3^2-2640*n5*n2^3*d+1708*n4^2*d^2+48*n1^2*n5^4-712*d*n1^3*n2
| ^2+6760*d^2*n5^2+32*n3*n5^2*n4^3-416*n3^3*d+1136*n1^3*n2^2+320*n5*n2^4+1116*n1*
| n4*n5^2*d^2+128*n1*n4*n3*n5^3-128*n1^4*n5*d+4160*n3*d^2*n4-4456*n1*d+4192*n1*n5
| +1952*n1*n4+4064*n1*n2+1680*n1^2+1792*n1*n3-3016*n3*d+2720*n3*n5+1728*n3*n4+
| 2560*n3*n2+688*n3^2-6064*n5*d+2752*n5^2+2848*n5*n4+5280*n5*n2-5704*n2*d+160*n2^
| 4*n4+32*n1^2*n2*n4^3-120*n1^3*n3*n4*d+688*n1^3*n5^2-2626*n3*d^3+560*n3^2*n5*d^2
| *n2+928*n1^2*n5*n2^2*n4+192*n1*n3*n2^2*n4^2+7632*n1*n2^2*n5+3328*n1*n3*n2^2+96*
| n3*n5^3*n4^2+128*n2^2*n4^3+3232*n5^2*n2*n1*n3-4488*n5^2*n2*d*n3+372*n2^2*n4^2*d
| ^2+48*n1^3*n5^3-212*n5*d^5-4352*n1^2*n2^2*d-224*n1*n4^2*d^3-5416*d*n2^2*n4-2896
| *d*n2*n4^2+88*n5*n4^3*d^2-88*n1*d*n5*n4^3+7204*n5*d^2*n4-7992*n2*n1^2*d+1552*n1
| *n5*n4^2+32*n3^3*n4^2*n5-1502*n5*n2*n4*d^3-3080*n4*d+464*n1^3*n2*n3*n5+96*n1^3*
| n4^2+48*n1^2*n4^3+4144*n5^2*n2^2-272*d*n1*n3^2*n5^2+16*n1^4*n5^2+496*n1*n2^3*n5
| *n3+16*n3^2*n5*n4^3+112*n1^4*n3-64*n4^3*n5^2*d+224*n5^2*n2^3*n4-8432*n1*n5*n4*d
| +3280*n1*n5^2*n4+7632*n1*n5*n4*n2-8632*n1*n2^2*d+3200*d^2-656*n5^3*n2^2*d-12048
| *d*n5*n4*n2-1280*d*n4*n5^2*n2^2-904*d*n4*n5^3*n2-8*d*n3*n4^4-616*n5*n2^2*n4^2*d
| +1236*n1^2*n2*n4*d^2+1136*n3*n1^2*n5^2+112*n3*n5^2*n2^3+80*n3^2*n5^2*n1^2+32*n1
| *n2^2*n3^3+80*n1^3*n5^2*n3-356*n2*n4^2*d^3-8872*n2*n1^2*d*n5-456*n1*d*n5^3*n4+
| 325*n1*d^4*n4-2016*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+418*n5^2*d^4+48*n1*n3*n2*n4^3
| +108*n4^2*d^4+2756*d^2*n5*n2*n1^2+912*n1^2*n2^2*n3*n5-360*d*n3*n2^2*n4^2+16*n3^
| 4*n5-80*n3^3*n2*d*n5-13848*d*n5*n2-10848*n1*n2*d+1424*n3^2*n5+3984*n1^2*n5-4488
| *n1^2*d-408*n1^2*n2*n4^2*d+244*n1*n3^2*n4*d^2-40*n1*n3^3*n4*d+1344*n3^2*n2-1760
| *n3^2*d+2512*n3*n2^2-6632*n3*n2*d+4480*n1*n2^2+832*n1*n3^2+7692*n2*d^2+8184*n5*
| d^2-88*n1^2*n3^2*n4*d+32*n1^2*n3^2*n4*n5+184*d^2*n5^4+5880*n2^2*d^2+451*n2*n4*d
| ^4+272*n5*n2^2*n3*n4^2+1132*n1*n4^2*d^2+48*n3*n2^2*n4^3-400*d^3*n5^3+5456*n5*n2
| ^2+5952*n5^2*n2-7152*n5^2*d-4808*n1*n3*d+4160*n1*n3*n5-6184*d*n2^2+4768*n1*n5^2
| +9792*n1*n5*n2+1712*n1^2*n3-11096*n1*n5*d+2848*n3*n5^2-160*d*n5*n2*n4^3+256*n1*
| n3*n4^2*d^2-64*d*n2^2*n4^3+48*n5*n2^2*n4^3+208*n1*n2^4*n5+560*n1*n4*n5^3*n2+
| 3024*n1*n5^2*n3+320*n5^3*n2^2*n4+2604*n1*n3*n5*d^2*n2+96*d^2*n3^3*n4+2384*n2^2+
| 1036*n1*n3*n5^2*d^2+336*n2*n3*n5^2*n4^2+4096*n1^2*n2+5568*n3*n5*n2-7016*n3*n5*d
| +4044*n3*d^2+4224*n1*n2*n3+6108*n1*d^2+1376*n1^2*n2^2*d^2-2992*d*n1^2*n4*n5+544
| *n1^3*n4*n5+656*n1^2*n4^2*n2+160*n1*n3^2*n4^2+80*n1*n3^3*n4+80*n1*n3*n4^3+432*
| n3^2*n4^2*n5+288*n5^4*n4-710*n5^2*n4*d^3+96*n1*n2*n3^2*n4^2-1084*n1*n2*d^3*n3-
| 624*n1*n2^3*d*n3+96*n2^2*n3^2*n4^2-968*n5^2*d*n3^2-2456*n1*n2*d^3*n5-1376*n1*n2
| ^3*d*n5+1304*n1*n2^2*d^2*n3-240*n5*n3^2*d*n4^2+1536*n3*n5*n4^2+800*n1*n3*n4^2-
| 7520*n5*d*n1^2+1315*n1*d^4+1760*n5*n3^2*n2+2288*n5*n2^3+32*n1*n2^2*n4^3+544*n5^
| 2*n2^3*n1+16*n2*n3*n4^4-8*n2*n4^4*d-40*n3^3*n4^2*d+6368*n5*n2*n4-5168*n1*d*n4-
| 4504*n1*n2^2*n4*d-304*d*n5*n4^3-4400*n1*n2*n3*n4*d+832*n1*n2*n3*n4^2+784*n1*n2*
| n3^2*n4-4440*n3*d*n4-103*n3*d^5-10144*n5*n2^2*d-4560*n2*d^3*n1-44*n3^3*d^3+748*
| n5^3*d^2*n1-9480*n1*n2*n5*n4*d-8832*n1*n2*n4*d+48*n5*n2^4*n4-8*n5*n3^4*d+32*n2*
| n5^5-1488*n1*n2*d*n5^3+3232*n2*n1^2*n3*n5-3904*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2
| -282*n3^2*d^3*n5+704*n1^2*n2*n3*n4*n5+112*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-4648*n3
| *n2^2*d+48*n3^3*n4*n2^2+48*n3^2*n4*n2^3+6300*n3*d^2*n2+784*n1*n3*n2^2*n5^2+6596
| *n3*d^2*n5-1088*n1^2*n3*n2^2*d+3856*n3*n5^2*n2-5128*n3*n5^2*d-432*n1^2*n5^3*d+
| 96*n1*n3^3*n5+32*n1^2*n5^2*n4^2-3568*n1*n5^2*d*n3+4812*n1*n5*d^2*n3-424*n1*n3*
| n5^3*d+48*n2*n3^2*n4^3+3808*n1*n5^2*n2*n4-1768*d*n5^3*n4-1360*n5^2*n4^2*d-6048*
| n2*n5^2*n4*d-222*n3*n4^2*d^3-11072*d*n5^2*n2+1028*d^2*n5^2*n1^2+512*n1^2*n4^2-
| 104*n1*n4^3*n2*d+256*n2^2*n5^2*n4^2+160*n3^3*n2*n5+6200*n3*n5*d^2*n2+3648*n5*n3
| *n2^2+96*n1*n2^3*n4^2-5348*n5*d^3+64*n5^5+3216*n1*n4*n3*n5+7056*n1^2*n2*n5-4048
| *n1*n3*n4*d+1136*n1^2*n3*n4-400*n4*n1^2*d^3+160*n3^2*n2^3+112*n1^2*n5^3*n3+264*
| n3^2*n5^2*d^2+13276*n5*d^2*n2-394*d^5+160*n3*n5^4+84*n3^3*n5*d^2+16*n1^2*n5*n4^
| 3-24*d*n1^2*n4^3-2536*n5*n3^2*d-1184*n3*n2^3*d-2432*d*n3^2*n2-56*n3*n1^4*d+144*
| n1^2*n2*n3^2*n4+272*n3^3*n2+32*n5^2*n2^4-6624*n3*n2*n4*d+1616*n3*n2*n4^2+2416*
| n3*n2^2*n4-2438*n2^2*d^3+640*n1*n5^2*n4^2+160*n1*n5*n4^3-200*d*n1*n4^3+3536*n1*
| n2*n3*n4*n5+3588*n5^2*n4*d^2+672*n3^2*n4*n5^2-3368*d*n5^3*n2+816*n3^2*n2^2+336*
| n1^4+1092*n1*n3*n5*n4*d^2-654*n2^2*n4*d^3+76*n4^3*n3*d^2-320*n2^3*d^3-1768*n4^2
| *d+4204*n4*d^2+32*n1^5*n2+416*n1*n5*n2^2*n4^2-1032*n1*n5*n2*n4^2*d+56*n1*d^2*n4
| ^3+1536*n2*n4^2+360*n3*n5^3*d^2+1216*n1*n5*n3^2-3272*n3*d*n1^2-1880*n1*n4^2*d-
| 400*d*n3*n5^3*n4-710*n4^2*d^3-560*n3*n2^2*d^3-660*n3^2*d^3-111*n4*d^5-2936*n5*
| n2*n4^2*d+4996*n1*d^2*n4-2000*n1^3*d*n5+192*n4^3+972*n1*d^2*n3^2-1986*n1*d^3*n3
| -336*d*n3^2*n4*n2^2+5476*n1*n2^2*d^2+289*n1^2*d^4+240*n1^3*n4*d^2+96*n4*n5^3*n3
| ^2+2072*n5^3*d^2+1216*n4*n2^3+16*n5*n1^2*n3^3-16*n2^5*d-88*n3*n4^2*n1^2*d+320*
| n2*n3*n5^3*n4+876*n2*n5*n4^2*d^2+336*n3*n2^3*d^2-80*n1*n2*n3^3*d-1576*n1*n3^2*d
| -2770*d^3*n4+256*n3*n4^3+768*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*n4^3+1388*n1*n2
| ^2*n4*d^2+288*n1^3*n2^2*n4-32*n3^4*d+432*n1^4*n2-490*n1*n3*n4*d^3+96*n1*n5*n2*
| n4^3+2000*n1^3*n2+1152*n5^2*n4^2+240*n1*n3*n2^3*n4-2976*d^3+3016*n3*d^2*n5^2-96
| *n5*n3*n4^3*d+192*n3*n5*n2^3*n4+2912*n4*n2^2+3552*n1*n4*n2*n3-2848*n5*n4^2*d-
| 5042*d^3*n2-1854*d^3*n1^2+480*n3^2*n1*n5^2+1348*n1*n3*n2*n4*d^2-1096*n1^2*n2^2*
| n4*d-2288*n1*n4*d*n5^2*n2-1144*n1*n2^2*d^3-592*d*n4*n1^3*n2+388*n1^2*n3*n4*d^2-
| 256*n1^3*d^3+309*n3*d^4*n1+3288*n2^2*n4*d^2+3872*n1*n5*n2^2*n4+108*d^2*n2*n4^3-
| 864*n1*n3^2*n4*d+624*n1*n3^2*n4*n5+688*n1*n3*n4^2*n5-7216*n2*d*n4+1664*n1^2*n4+
| 1024*n1*n4^2+1120*n1^3-192*d*n5^3*n4^2-9744*d*n5^2*n2*n1-2610*n3*d^3*n2+1024*n3
| *n2^3+32*n1^2*n3^3*n2-80*d*n3^2*n5^3+16*n1*n5^5-896*n1^3*n3*d+2816*n3*d^2*n2^2+
| 4060*n3*n5*n4*d^2+4008*n3*n2*n4*d^2-3944*n2*n1^2*n4*d+3280*n2*n1^2*n4*n5+272*n2
| *n3^3*n4+272*n3*n2*n4^3+112*n1^4*n4+216*d^2*n4^3+432*n1*n2^4+4*n4^4*d^2-932*n1^
| 2*d^3*n5+16*n2*n3^4+16*n5*n3^2*n2^3+560*n5^4*n2-352*n1*n5^2*n4^2*d+928*n3*n2*n5
| ^3-152*n5*d*n3^3*n4-80*n3^2*n2^3*d-2772*d^3*n5^2-448*n2^4*d+32*n1^3*n3*n4*n5+
| 608*n3^2*n4*n2^2-352*n3^3*n4*d+272*n3^3*n4*n5+1088*n5*n2^2*n4^2+1136*n5*n2^3*n4
| -1304*d*n2^2*n4^2-1392*d*n2^3*n4+1732*n5*n4^2*d^2+1776*n2*n4^2*d^2+272*n5*n2*n4
| ^3+288*n3^3*n5+320*n2*n4^3-4288*n3*n5*d*n2^2+752*n1^2*n2*n3*n5^2-1936*n3*n5^2*d
| *n1*n2+457*n5*n4*d^4-280*d*n3*n4^3+176*n1*n2*n4^3+320*n5*n4^2*n1^2*n2-208*n5*n4
| ^2*n1^2*d-344*n1*n5*n3^2*n4*d+32*n3^4-360*n1^3*n5^2*d+304*n3^2*n2*n1^2*n5+768*
| n1*n5^3*n3-912*n1^2*n2*n3*n4*d-2694*n5*n3*d^3-80*n1*n3^2*n4^2*d+172*n1^2*n4^2*d
| ^2+560*n2*n1^2*n5^3+3936*n1*n2^2*n5^2-8*n3^4*n2*d-288*d*n1^3*n4*n5+16*n2*n3^2*
| n5^3+48*n3*n2^3*n4^2+16*n1^4*n5*n3+2144*n1^3*n2*n5+240*n2^3*n4^2+1192*n3^2*n4*d
| ^2-2656*n1*n2^3*d-1768*n5*n3*n4^2*d+788*n1^3*n2*d^2-196*n1*d^3*n3^2+184*n1^2*d^
| 2*n3^2-64*n1^3*n3^2*d+1744*n1^2*n2^2*n4+400*n1^2*n4^2*n5-600*n1^2*n4^2*d+16*n3*
| n4^4+887*d^4*n4+336*n5^3*n4^2+112*n5^2*n4^3+80*n3^3*n4^2+32*n3^4*n4+64*n3^2*n4^
| 3-8176*n3*n2*n1*d+7904*n1*n5^2*n2-10264*n3*d*n2*n5+832*n3*n5*n2^3+672*n1*n3^2*
| n2^2-2528*n1^3*n2*d-480*n5*n4*n1^2*n3*d+528*n5*n4*n1*n2^3+748*d^2*n5*n2^3-203*
| n2*d^5-1228*d^3*n5*n2^2+1248*n1*n2*n3^2*n5-1680*n1*n2*n3^2*d-152*n3^3*d*n1+1104
| *n3*n4^2+6972*n2*n4*d^2+1728*n1^2*n3*n2^2+11852*n1*n2*n5*d^2+84*n3^3*n2*d^2-167
| *n1*d^5+48*n1*n5^4*n4+160*n3^2*n4^2*d^2+820*n1*n2^3*d^2-288*n2*n3^2*n4^2*d+1152
| *n3^2*n4+3200*n5^2*n4+1520*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-8488*n3*n5*d
| *n1*n2+1476*n5*d^2*n3^2+2512*n1^2*n4*n5-3176*n1^2*n4*d+1520*n5^3*n4+3104*n1^2*
| n2*n4-360*n4^3*d+560*n3^2*n5*n2^2-2128*n1*n3*d*n5*n2*n4-1032*n1*n5*n4*d^3-1162*
| n1*n2*n4*d^3-344*n5*n4^2*d^3-856*n2*n3*n5*n4^2*d+1120*n2^2*n4^2-40*n1*d*n3*n4^3
| +880*n5^2*n3^2+3744*n3*n5*n4+3584*n3*n2*n4-7512*n5*d*n4-2736*d*n2^3+112*n2*n3^3
| *n4*n5-1694*n3*n4*d^3-2994*n5*n4*d^3-2924*n2*n4*d^3+851*n2*d^4*n5-616*d*n5*n2^3
| *n4+16*n4^3*n5^3+1636*n3^2*d^2-776*n3^2*d*n5*n2*n4+98*n3^2*d^4-2344*n1*d*n5*n2^
| 2*n4+464*n2*n1^3*n4*n5-400*n2*n1^2*d*n3^2+1444*n3^2*d^2*n2+2272*n1*n2^3*n5+6164
| *n5*n2^2*d^2+560*n5^2*n2*n3^2+3648*n5^2*n2*n1^2+7436*n5*n2*n4*d^2-312*n3^3*d*n5
| +2240*n1*n5^3+2128*n1*n2^3+1712*n1^3*n5+128*n1*n2*n3^3+608*n5^4+128*n1^3*n3^2+
| 6832*n1*n3*n2*n5+2624*n3*n5^2*n4+4376*d^2*n1^2-720*n1*n3*d*n5^2*n4+544*n3*n2^3*
| n4+1200*n2*n5^2*n4^2+1552*n2*n5^3*n4+464*n5*n1^2*n3^2+512*n1^3*n5^2*n2+1184*n5^
| 3*n3-2000*d*n5*n2*n3^2+1024*n1*n2^3*n3+1620*d^2*n5*n2^2*n4+176*n3*n5*n4^3+2240*
| n5^2*n2^2*n4+832*n1*n4*n5^3+656*n4^2+396*n5^2*n4^2*d^2+932*n1^2*n5*d^2*n3-1312*
| n1^3*n2*d*n5+208*n1^3*n3*n4*n2+236*d^2*n3^3+224*n3^2*n5*n2^2*n4-416*n1*n2^2*d*
| n3^2-504*d*n5^3*n2*n3+32*n4^2*n5^4+1504*d^4-752*n1*n2*d*n5*n3^2+112*n1*n4*n3^2*
| n5^2-152*d*n2*n3^3*n4+548*n2*n3*n4^2*d^2-288*n3^2*n5*d*n2^2+768*n2*n1^2*n4*n5^2
| -1984*n1^2*n5*d*n3*n2+424*n1*n5*d^2*n3^2+608*n1*n5^3*n2^2+192*n1*n3^2*n4*n2^2+
| 32*n1*n3*n5*n4^3+944*n1*n5^2*n2^2*n4-304*n3^3*n2*d+48*n1*n5^4*n3-18808*n5*n2*n1
| *d+3008*n1^2*n5^2+256*n5*n4^3+42*d^6+1868*n2*n3*n5*n4*d^2+124*d^2*n2^4+16*n2*n4
| ^4-1080*n2*d^3*n1^2-160*d*n4*n5^4+192*n1^3*n2^3+128*n1*n3*n5^2*n4^2+16*n3*n2^4*
| n4+5392*n3*n5*n4*n2-6816*n3*n5*n4*d+48*n1*n2*n3^3*n5+64*n3*n5^4*n4+2968*n1*n5^2
| *n2*d^2+128*n3*n5^3*n2^2+4512*n1*n5*n4+2176*n1*n4*n3-4058*n1*d^3-2096*d*n1^3-
| 376*n5^2*n3*n4^2*d+48*n1*n2*n3^3*n4+208*n2*n5*n1^4+504*n5*n3*n4^2*d^2+176*n1^2*
| n3*n4^2+1376*n2*n3^2*n4*n5+896*n1^2*n3*n4*n5+1472*n1^2*n3*n4*n2-1344*n1^2*n3*n4
| *d+816*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+44*n1*d^2*n3^3+1702*n5*d^4+64*n5^2*n3^3*
| n4+752*n1*n4*n3^2+3616*n1*n4*n2^2+10640*n2*n1*d^2+256*n1^3*d^2*n3+2864*n5^3*n2-
| 3048*n3*d*n5^2*n4+2416*n2*n3*n4*n5^2-1800*n1*n5*n4^2*d-2016*n1*n2*n4^2*d-3856*
| n1*d*n5^2*n4-912*n1*n3*n4^2*d-584*n3^2*n4^2*d+656*n3*n5^2*n4^2-1344*d^3*n5^2*n2
| +32*n2^5+240*n3^3+1952*n5^3+1632*n2^3*d^2-376*d*n2*n4^3-2400*n1^2*n2^2*n5*d+399
| *n3*d^4*n2+1240*n3*n5*n2^2*d^2-712*n2*n5^2*n4^2*d+1416*n5^2*n2^2*d^2+48*n3^3*n1
| ^2-1230*d^3*n5*n2*n3-448*d*n5*n2^3*n3+1224*n1^2*d^2*n3*n2-1976*n3*n4^2*d+4640*
| n5*n2^2*n4+2416*n5*n2*n4^2+2672*n5*n3*n1^2+3392*n1^2*n2^2-1076*d^3*n5^2*n1+320*
| n3^3*n4+528*n3^2*n4^2+128*n1*n3^3+704*n1^3*n4+528*n1^2*n3^2-4192*n1*n3*d*n2^2+
| 5192*n1*n3*d^2*n2+1280*n1^3*d^2-796*n3*n2*n4*d^3-3192*n1^2*n5*d*n3-1448*n1*n5*d
| *n3^2+32*n1^5+976*n1^2*n4*n5^2+240*n1^3*n4*n3-832*n1^3*n4*d+960*n1^3*n4*n2+872*
| n1^2*n5*n4*d^2-528*d*n1^2*n4*n5^2-384*n1^4*d+160*n2*n5^4*n4-640*n1*d*n2^3*n4-
| 480*n1*d*n2^2*n4^2-1232*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-80*d*n2^4*n4+5008*n5^2*
| n4*n2-5936*n5^2*n4*d-48*n1^3*n4^2*d-712*d*n1^2*n2^3+4576*n1*n2*n4-152*n3*d*n2*
| n4^3+876*n5^2*n3*n4*d^2+3840*n1^2*n2^2*n5+432*n1*n5^3*n3*n2+192*n2*n5^3*n4^2+64
| *n2*n5^2*n4^3+432*n2^2*n3*n4*n5^2+1615*n2*d^4-672*d*n5^4-24*n1^2*n3^3*d+1488*n3
| *n2*n5*n4^2+656*n3*n2^2*n4^2+704*n3*n5^3*n4+960*n2*n1^3*n3+640*n2*n1^2*n3^2-
| 1312*n3*n5^3*d+288*n1^3*n2^2*n3-288*d*n3*n4*n2^3+16*n4^4-312*d*n5^4*n2+624*n1^2
| *n5*n2^3+96*n2^2*n5^4+32*n1^2*n3*n4^2*n5+2032*n1^2*d^2*n3+976*n5^3*n2*d^2+722*
| n1*n2*d^4-2384*n5^2*n2^2*n1*d-800*n5^2*n2^2*d*n3+108*n1^4*d^2+1296*n1*n5^2*n3*
| n4-3776*n1*n5*n3*n4*d-1384*n2*n3*d*n5^2*n4-582*n3*n5^2*d^3-412*n3*d^3*n1^2+1796
| *n4*d^2*n5^2*n2+695*n1*d^4*n5+520*n5*n4*n3^2*d^2+224*n3^2*n2*n5*n4^2+1056*n1*n2
| ^3*n4+800*n1*n2^2*n4^2+1776*n1*n2^2*n3*n4-1832*n5*n3^2*n4*d+1712*n5*n1*n4^2*n2-
| 5536*d*n5*n2^2*n4-2832*d*n3*n4*n2^2+2192*n3*n5*n2^2*n4-1896*n3*n2*n4^2*d+1972*
| n1^2*n4*d^2-2100*n1*d^3*n4+2460*n1*n3*n4*d^2+5152*n1*n5*n4*d^2+5588*n1*n2*n4*d^
| 2-16*n4^4*d+512*n3^2*n2*n4^2-6392*n5*n2*n3*n4*d-1824*d*n2*n3^2*n4-968*n3*d^3*n1
| *n5+254*n3*n4*d^4+176*n1^2*n3^2*n4-472*n1*n2*n3^2*n4*d+352*n1*n2*n3^2*n4*n5-
| 1080*n1*d*n3*n4*n2^2+1184*n5^3*n2^2+64*n1*n3^2*n4^2*n5+516*n1*n5*n4^2*d^2+616*
| n1*n2*n4^2*d^2-384*n5^2*n3^2*n4*d+96*n1^2*n5^2*n3*n4-376*n1*n3*n5*n4^2*d+48*n1^
| 3*n4*n5^2+80*n3^3*n2^2+3424*n1*n2^2*n5*n3-9512*n1*n2^2*n5*d+8*d^2*n3^4-336*n1^3
| *n3*n5*d+96*n5^3*n2^3+288*n1^2*n2^3*n4+96*n1*n2^4*n4-228*n4*d^3*n3^2+192*n1^2*
| n2^2*n4^2+272*n2*n4*n3^2*n5^2-496*n1*n3*n2*n4^2*d+240*n1*n5^2*n3^2*n2+16*n1*n5^
| 2*n3^3+400*n1*n3*n2*n5*n4^2+1288*n3*n5^2*d^2*n2+128*n1^2*n2^4-632*n3^2*d*n1^2-
| 936*n3^2*d*n2^2+800*n1^2*n5^3+1156*n3*n4^2*d^2+2932*d^2*n5*n2^2*n1+2904*n5*n1*
| n4*n2*d^2+64*n4*n1^2*n5^3-56*n1*n5*n3^3*d+400*n1*n5^4+432*n1^2*n3*n4*n2^2+1136*
| n1^2*n2^3+32*n1*n2^5+524*n3^2*n2*n4*d^2+96*n1*n2^4*n3-160*d*n5*n2^4+624*n1^3*n2
| ^2*n5-288*d*n5^2*n2*n3^2+32*n1*n3^3*n4*n5-40*n5^2*n3^3*d+2496*n5^3*n2*n1+16*n2*
| n3^4*n4-56*n1^4*n4*d+96*n1^4*n4*n2+16*n1^4*n4*n5-16*n3^4*n4*d+16*n3^4*n4*n5+640
| *n5*n1^3*n3-264*n1^4*n2*d+784*n1*n4*n3*n5^2*n2-592*n2*n1^3*n3*d-794*n5*n3*n4*d^
| 3+1008*n5^2*n2^2*n1^2+6736*n5^2*n2*d^2+1504*n2^3+400*n2^4+264*n3^2*n2^2*d^2+32*
| n3^2*n5*n1^3+405*n3*d^4*n5+288*n5*n1*n3^2*n2^2+572*n1^3*d^2*n5+192*n2^2*n1^2*n3
| ^2+144*n3*n2^4-3552*n1^2*n5^2*d-2608*n1*n5^3*d+5396*n1*n5^2*d^2+4628*n1^2*d^2*
| n5+128*n1^4*n2^2-32*n5^5*d+160*n3^2*n5^3-624*d*n1^2*n3*n5^2+80*n3^3*n5^2+16*n5^
| 5*n4+96*n3^2*n4^2*n5^2-80*n3*n5^4*d+48*n3*n5^4*n2+416*n1*n4^2*n5^2*n2-5538*n2*d
| ^3*n5+1456*n5^2*n2^2*n3-4888*n5^2*n2^2*d+5124*n2*n1^2*d^2)
""".stripMargin)
val a9 = ring(
"""
| (-44*d*n5^2*n2*n1^2-
| 4*d^2*n2^3*n4+8*n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-12*d
| ^2*n5^3*n4-4*n5^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*n5-40
| *n1*d^3*n5+32*n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3*d^2*
| n4-16*n1*d+32*n1*n5-32*n1*n4+32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16*n1^2*n5*
| n2^2*n4+104*n1*n2^2*n5+24*n1*n3*n2^2+40*n5^2*n2*n1*n3-8*n2^2*n4^2*d^2-32*n1^2*
| n2^2*d+3*n1*n4^2*d^3+80*d*n2^2*n4+36*d*n2*n4^2-96*n5*d^2*n4-104*n2*n1^2*d-32*n1
| *n5*n4^2+25*n5*n2*n4*d^3+16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n1^2*d^2*n3+5*n1*n2*d^4-40*n5^2*n2^2*n1*d-16*n1*n5^2*n3*n4+36*n1*
| n5*n3*n4*d+24*n2*n3*d*n5^2*n4-3*n3*d^3*n1^2-44*n4*d^2*n5^2*n2+6*n1*d^4*n5+8*n1*
| n2^3*n4-16*n1*n2^2*n4^2-16*n1*n2^2*n3*n4-48*n5*n1*n4^2*n2+116*d*n5*n2^2*n4+28*d
| *n3*n4*n2^2-40*n3*n5*n2^2*n4+4*n1^2*n4*d^2+16*n1*d^3*n4-16*n1*n3*n4*d^2-48*n1*
| n5*n4*d^2-32*n1*n2*n4*d^2+64*n5*n2*n3*n4*d-5*n3*d^3*n1*n5-n3*n4*d^4+8*n1*d*n3*
| n4*n2^2-10*n1*n5*n4^2*d^2-10*n1*n2*n4^2*d^2+40*n1*n2^2*n5*n3-116*n1*n2^2*n5*d-4
| *n1^3*n3*n5*d+16*n1^2*n5^3+32*d^2*n5*n2^2*n1-18*n5*n1*n4*n2*d^2+8*n1*n5^4+56*n5
| ^3*n2*n1+8*n5*n1^3*n3-16*n1*n4*n3*n5^2*n2-4*n2*n1^3*n3*d+5*n5*n3*n4*d^3+16*n5^2
| *n2^2*n1^2+6*n1^3*d^2*n5-68*n1^2*n5^2*d-44*n1*n5^3*d+68*n1*n5^2*d^2+72*n1^2*d^2
| *n5-8*d*n1^2*n3*n5^2-16*n1*n4^2*n5^2*n2+56*n2*n1^2*d^2)
""".stripMargin)
val a10 = ring(
"""
| (32+88*n1+88*n2+88*n3+88*n4
| +64*n5-88*d+104*n4*n2-130*n1*d+100*n1*n5+104*n1*n4+104*n1*n2+52*n1^2+104*n1*n3-
| 130*n3*d+100*n3*n5+104*n3*n4+104*n3*n2+52*n3^2-108*n5*d+40*n5^2+100*n5*n4+100*
| n5*n2-130*n2*d-130*n4*d+72*d^2-72*d*n5*n2-68*n1*n2*d+28*n3^2*n5+28*n1^2*n5-34*
| n1^2*d+24*n3^2*n2-34*n3^2*d+24*n3*n2^2-68*n3*n2*d+24*n1*n2^2+24*n1*n3^2+45*n2*d
| ^2+42*n5*d^2+28*n5*n2^2+28*n5^2*n2-32*n5^2*d-68*n1*n3*d+56*n1*n3*n5-34*d*n2^2+
| 28*n1*n5^2+56*n1*n5*n2+24*n1^2*n3-72*n1*n5*d+28*n3*n5^2+52*n2^2+24*n1^2*n2+56*
| n3*n5*n2-72*n3*n5*d+45*n3*d^2+48*n1*n2*n3+45*n1*d^2+56*n5*n2*n4-68*n1*d*n4-68*
| n3*d*n4-34*n4^2*d+45*n4*d^2+24*n2*n4^2+8*n4^3-18*d^3+24*n4*n2^2-68*n2*d*n4+24*
| n1^2*n4+24*n1*n4^2+8*n1^3+24*n3*n4^2+24*n3^2*n4+28*n5^2*n4+28*n5*n4^2+56*n3*n5*
| n4+48*n3*n2*n4-72*n5*d*n4+52*n4^2+56*n1*n5*n4+48*n1*n4*n3+8*n3^3+8*n5^3+48*n1*
| n2*n4+8*n2^3)
""".stripMargin)
val a11 = ring(
"""
| (768+64*n1^4*n2*n3-40*
| d^3*n4^3+1728*n1+2112*n2+1728*n3+1344*n4+2304*n5-2944*d-272*d*n5^2*n2^3+275*n2^
| 2*d^4-848*d*n5^2*n2*n1^2+264*d^2*n2^3*n4+96*n1^3*n2*n3^2+512*n5^2*n2^3+48*n1^3*
| n2*n4^2+96*n1*n5^4*n2+16*n3*n2^4*n5+3136*n4*n2+768*n1*n3*n5*n2^2*n4+1125*d^4*n3
| +48*n1*n5^3*n3^2-136*n1*n2^4*d+96*n1*n3^2*n2^3-1680*n1*n2^2*n5*d*n3+748*n1*n3^2
| *d^2*n2+64*n3^2*n2^2*n5^2+32*n1^4*n5+1952*n3^2*n4*n5+1968*n3^2*n4*n2-8*n1^5*d+
| 424*d^2*n5^3*n4+192*n1^2*n2^3*n3-64*n5^4*d*n1-2768*n3^2*n4*d-8824*n1*n5*d*n3+
| 6244*n1*d^2*n3-5416*n1*n5^2*d+8212*n1*d^2*n5+160*n1*n4^3-3222*n1*d^3*n5-2432*n5
| ^3*d-192*n3^2*d*n1^2*n5-48*n3*n2^4*d+2752*n2*n1^2*n3+1488*n1*n2*n4^2+2224*n1*n2
| *n3^2-1536*n5*n2^3*d+1876*n4^2*d^2-16*n1^2*n5^4-352*d*n1^3*n2^2+5576*d^2*n5^2+
| 32*n3*n5^2*n4^3-784*n3^3*d+560*n1^3*n2^2+160*n5*n2^4+876*n1*n4*n5^2*d^2+160*n1*
| n4*n3*n5^3-16*n1^4*n5*d+5532*n3*d^2*n4-5248*n1*d+3872*n1*n5+2464*n1*n4+3808*n1*
| n2+1248*n1^2+3008*n1*n3-5312*n3*d+4000*n3*n5+2592*n3*n4+3680*n3*n2+1376*n3^2-
| 7136*n5*d+2624*n5^2+3296*n5*n4+5088*n5*n2-6560*n2*d+96*n2^4*n4+16*n1^2*n2*n4^3-
| 80*n1^3*n3*n4*d+16*n1^3*n5^2-3824*n3*d^3+712*n3^2*n5*d^2*n2+464*n1^2*n5*n2^2*n4
| +192*n1*n3*n2^2*n4^2+4464*n1*n2^2*n5+3216*n1*n3*n2^2+96*n3*n5^3*n4^2+96*n2^2*n4
| ^3+2784*n5^2*n2*n1*n3-4368*n5^2*n2*d*n3+288*n2^2*n4^2*d^2-32*n1^3*n5^3-184*n5*d
| ^5-2360*n1^2*n2^2*d-214*n1*n4^2*d^3-4512*d*n2^2*n4-2832*d*n2*n4^2+76*n5*n4^3*d^
| 2-72*n1*d*n5*n4^3+7348*n5*d^2*n4-4832*n2*n1^2*d+1456*n1*n5*n4^2+32*n3^3*n4^2*n5
| -1244*n5*n2*n4*d^3+16*n1*n3^4*n5-4256*n4*d+272*n1^3*n2*n3*n5+64*n1^3*n4^2+32*n1
| ^2*n4^3+2576*n5^2*n2^2-336*d*n1*n3^2*n5^2-16*n1^4*n5^2+336*n1*n2^3*n5*n3+16*n3^
| 2*n5*n4^3+48*n1^4*n3-56*n4^3*n5^2*d+144*n5^2*n2^3*n4-7768*n1*n5*n4*d+2720*n1*n5
| ^2*n4+6048*n1*n5*n4*n2-5824*n1*n2^2*d+4624*d^2-352*n5^3*n2^2*d-10728*d*n5*n4*n2
| -872*d*n4*n5^2*n2^2-656*d*n4*n5^3*n2-8*d*n3*n4^4-448*n5*n2^2*n4^2*d+776*n1^2*n2
| *n4*d^2+448*n3*n1^2*n5^2+80*n3*n5^2*n2^3+16*n3^2*n5^2*n1^2+64*n1*n2^2*n3^3-48*
| n1^3*n5^2*n3-322*n2*n4^2*d^3-4280*n2*n1^2*d*n5-360*n1*d*n5^3*n4+299*n1*d^4*n4-
| 1128*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+314*n5^2*d^4+64*n1*n3*n2*n4^3+109*n4^2*d^4+
| 1312*d^2*n5*n2*n1^2+608*n1^2*n2^2*n3*n5-360*d*n3*n2^2*n4^2+32*n3^4*n5-112*n3^3*
| n2*d*n5-12360*d*n5*n2-9320*n1*n2*d+2224*n3^2*n5+2000*n1^2*n5-3032*n1^2*d-264*n1
| ^2*n2*n4^2*d+392*n1*n3^2*n4*d^2-80*n1*n3^3*n4*d+2064*n3^2*n2-3208*n3^2*d+2816*
| n3*n2^2-8824*n3*n2*d+3168*n1*n2^2+1728*n1*n3^2+8052*n2*d^2+8712*n5*d^2-128*n1^2
| *n3^2*n4*d+64*n1^2*n3^2*n4*n5+104*d^2*n5^4+4728*n2^2*d^2+408*n2*n4*d^4+272*n5*
| n2^2*n3*n4^2+1124*n1*n4^2*d^2+48*n3*n2^2*n4^3-260*d^3*n5^3+4048*n5*n2^2+4512*n5
| ^2*n2-6288*n5^2*d-7104*n1*n3*d+5120*n1*n3*n5-5264*d*n2^2+3104*n1*n5^2+7072*n1*
| n5*n2+1696*n1^2*n3-9240*n1*n5*d+3296*n3*n5^2-128*d*n5*n2*n4^3+324*n1*n3*n4^2*d^
| 2-48*d*n2^2*n4^3+32*n5*n2^2*n4^3+96*n1*n2^4*n5+352*n1*n4*n5^3*n2+2816*n1*n5^2*
| n3+208*n5^3*n2^2*n4+2384*n1*n3*n5*d^2*n2+116*d^2*n3^3*n4+2176*n2^2+852*n1*n3*n5
| ^2*d^2+16*n1*n2*n3^4+336*n2*n3*n5^2*n4^2+2576*n1^2*n2+6528*n3*n5*n2-9496*n3*n5*
| d+6420*n3*d^2+5280*n1*n2*n3+6340*n1*d^2+736*n1^2*n2^2*d^2-1936*d*n1^2*n4*n5+176
| *n1^3*n4*n5+448*n1^2*n4^2*n2+224*n1*n3^2*n4^2+160*n1*n3^3*n4+96*n1*n3*n4^3+448*
| n3^2*n4^2*n5+240*n5^4*n4-618*n5^2*n4*d^3+144*n1*n2*n3^2*n4^2-1102*n1*n2*d^3*n3-
| 464*n1*n2^3*d*n3+96*n2^2*n3^2*n4^2-1216*n5^2*d*n3^2-1530*n1*n2*d^3*n5-680*n1*n2
| ^3*d*n5+1140*n1*n2^2*d^2*n3-248*n5*n3^2*d*n4^2+1664*n3*n5*n4^2+1072*n1*n3*n4^2-
| 3552*n5*d*n1^2+1137*n1*d^4+2320*n5*n3^2*n2+1360*n5*n2^3+16*n1*n2^2*n4^3+240*n5^
| 2*n2^3*n1+16*n2*n3*n4^4-8*n2*n4^4*d-40*n3^3*n4^2*d+5952*n5*n2*n4-5896*n1*d*n4-
| 3128*n1*n2^2*n4*d-264*d*n5*n4^3-5152*n1*n2*n3*n4*d+1040*n1*n2*n3*n4^2+1232*n1*
| n2*n3^2*n4-6232*n3*d*n4-131*n3*d^5-7184*n5*n2^2*d-3442*n2*d^3*n1-76*n3^3*d^3+
| 324*n5^3*d^2*n1-7152*n1*n2*n5*n4*d-7824*n1*n2*n4*d+32*n5*n2^4*n4-16*n5*n3^4*d+
| 16*n2*n5^5-672*n1*n2*d*n5^3+2368*n2*n1^2*n3*n5-3336*n2*n1^2*n3*d+144*n1^2*n2*n3
| *n4^2-384*n3^2*d^3*n5+592*n1^2*n2*n3*n4*n5+112*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-
| 4928*n3*n2^2*d+48*n3^3*n4*n2^2+48*n3^2*n4*n2^3+7848*n3*d^2*n2+576*n1*n3*n2^2*n5
| ^2+8332*n3*d^2*n5-808*n1^2*n3*n2^2*d+3872*n3*n5^2*n2-5624*n3*n5^2*d-40*n1^2*n5^
| 3*d+288*n1*n3^3*n5+64*n1^2*n5^2*n4^2-3112*n1*n5^2*d*n3+5028*n1*n5*d^2*n3-272*n1
| *n3*n5^3*d+48*n2*n3^2*n4^3+2624*n1*n5^2*n2*n4-1480*d*n5^3*n4-1224*n5^2*n4^2*d-
| 4744*n2*n5^2*n4*d-252*n3*n4^2*d^3-8008*d*n5^2*n2+296*d^2*n5^2*n1^2+448*n1^2*n4^
| 2-80*n1*n4^3*n2*d+176*n2^2*n5^2*n4^2+224*n3^3*n2*n5+6604*n3*n5*d^2*n2+3552*n5*
| n3*n2^2+48*n1*n2^3*n4^2-5248*n5*d^3+32*n5^5+4128*n1*n4*n3*n5+3472*n1^2*n2*n5-
| 5696*n1*n3*n4*d+1264*n1^2*n3*n4-278*n4*n1^2*d^3+176*n3^2*n2^3-16*n1^2*n5^3*n3+
| 324*n3^2*n5^2*d^2+11132*n5*d^2*n2-422*d^5+128*n3*n5^4+132*n3^3*n5*d^2+16*n1^2*
| n5*n4^3-16*d*n1^2*n4^3-3752*n5*n3^2*d-1000*n3*n2^3*d-3568*d*n3^2*n2-24*n3*n1^4*
| d+192*n1^2*n2*n3^2*n4+448*n3^3*n2+16*n5^2*n2^4-7920*n3*n2*n4*d+1824*n3*n2*n4^2+
| 2512*n3*n2^2*n4-1870*n2^2*d^3+608*n1*n5^2*n4^2+128*n1*n5*n4^3-176*d*n1*n4^3+
| 3904*n1*n2*n3*n4*n5+3192*n5^2*n4*d^2+752*n3^2*n4*n5^2-2056*d*n5^3*n2+1056*n3^2*
| n2^2+112*n1^4+1296*n1*n3*n5*n4*d^2-508*n2^2*n4*d^3+80*n4^3*n3*d^2-202*n2^3*d^3-
| 2064*n4^2*d+5284*n4*d^2+16*n1^5*n2+256*n1*n5*n2^2*n4^2-792*n1*n5*n2*n4^2*d+48*
| n1*d^2*n4^3+1584*n2*n4^2+324*n3*n5^3*d^2+2000*n1*n5*n3^2-2976*n3*d*n1^2-1952*n1
| *n4^2*d-416*d*n3*n5^3*n4-744*n4^2*d^3-544*n3*n2^2*d^3-1050*n3^2*d^3-115*n4*d^5-
| 2512*n5*n2*n4^2*d+5240*n1*d^2*n4-480*n1^3*d*n5+208*n4^3+1660*n1*d^2*n3^2-2422*
| n1*d^3*n3-368*d*n3^2*n4*n2^2+3552*n1*n2^2*d^2+166*n1^2*d^4+112*n1^3*n4*d^2+96*
| n4*n5^3*n3^2+1384*n5^3*d^2+848*n4*n2^3+16*n5*n1^2*n3^3-8*n2^5*d-104*n3*n4^2*n1^
| 2*d+320*n2*n3*n5^3*n4+732*n2*n5*n4^2*d^2+276*n3*n2^3*d^2-192*n1*n2*n3^3*d-2944*
| n1*n3^2*d-3224*d^3*n4+272*n3*n4^3+432*n3*n1^3+80*n1*n5^3*n4^2+32*n1*n5^2*n4^3+
| 928*n1*n2^2*n4*d^2+144*n1^3*n2^2*n4-64*n3^4*d+208*n1^4*n2-614*n1*n3*n4*d^3+64*
| n1*n5*n2*n4^3+976*n1^3*n2+1040*n5^2*n4^2+192*n1*n3*n2^3*n4-3816*d^3+3164*n3*d^2
| *n5^2-96*n5*n3*n4^3*d+176*n3*n5*n2^3*n4+2544*n4*n2^2+4416*n1*n4*n2*n3-2760*n5*
| n4^2*d-4888*d^3*n2-1108*d^3*n1^2+640*n3^2*n1*n5^2+1496*n1*n3*n2*n4*d^2-608*n1^2
| *n2^2*n4*d-1528*n1*n4*d*n5^2*n2-718*n1*n2^2*d^3-304*d*n4*n1^3*n2+388*n1^2*n3*n4
| *d^2-106*n1^3*d^3+350*n3*d^4*n1+2636*n2^2*n4*d^2+2464*n1*n5*n2^2*n4+96*d^2*n2*
| n4^3-1440*n1*n3^2*n4*d+1008*n1*n3^2*n4*n5+848*n1*n3*n4^2*n5-7680*n2*d*n4+1424*
| n1^2*n4+1120*n1*n4^2+448*n1^3-176*d*n5^3*n4^2-5360*d*n5^2*n2*n1-3072*n3*d^3*n2+
| 896*n3*n2^3+64*n1^2*n3^3*n2-88*d*n3^2*n5^3-496*n1^3*n3*d+2848*n3*d^2*n2^2+4724*
| n3*n5*n4*d^2+4616*n3*n2*n4*d^2-2576*n2*n1^2*n4*d+1904*n2*n1^2*n4*n5+320*n2*n3^3
| *n4+288*n3*n2*n4^3+32*n1^4*n4+212*d^2*n4^3+224*n1*n2^4+4*n4^4*d^2-408*n1^2*d^3*
| n5+32*n2*n3^4+32*n5*n3^2*n2^3+304*n5^4*n2-344*n1*n5^2*n4^2*d+848*n3*n2*n5^3-168
| *n5*d*n3^3*n4-88*n3^2*n2^3*d-2172*d^3*n5^2-248*n2^4*d+672*n3^2*n4*n2^2-432*n3^3
| *n4*d+304*n3^3*n4*n5+800*n5*n2^2*n4^2+736*n5*n2^3*n4-1032*d*n2^2*n4^2-952*d*n2^
| 3*n4+1640*n5*n4^2*d^2+1664*n2*n4^2*d^2+224*n5*n2*n4^3+480*n3^3*n5+304*n2*n4^3-
| 4016*n3*n5*d*n2^2+448*n1^2*n2*n3*n5^2-1592*n3*n5^2*d*n1*n2+429*n5*n4*d^4-296*d*
| n3*n4^3+144*n1*n2*n4^3+208*n5*n4^2*n1^2*n2-200*n5*n4^2*n1^2*d-544*n1*n5*n3^2*n4
| *d+64*n3^4+304*n3^2*n2*n1^2*n5+528*n1*n5^3*n3-832*n1^2*n2*n3*n4*d-3210*n5*n3*d^
| 3-112*n1*n3^2*n4^2*d+140*n1^2*n4^2*d^2+160*n2*n1^2*n5^3+1936*n1*n2^2*n5^2-16*n3
| ^4*n2*d-80*d*n1^3*n4*n5+32*n2*n3^2*n5^3+48*n3*n2^3*n4^2-16*n1^4*n5*n3+816*n1^3*
| n2*n5+160*n2^3*n4^2+1564*n3^2*n4*d^2-1504*n1*n2^3*d-1904*n5*n3*n4^2*d+388*n1^3*
| n2*d^2-310*n1*d^3*n3^2+200*n1^2*d^2*n3^2-40*n1^3*n3^2*d+992*n1^2*n2^2*n4+368*n1
| ^2*n4^2*n5-504*n1^2*n4^2*d+16*n3*n4^4+969*d^4*n4+304*n5^3*n4^2+96*n5^2*n4^3+80*
| n3^3*n4^2+32*n3^4*n4+64*n3^2*n4^3-9440*n3*n2*n1*d+4512*n1*n5^2*n2-11432*n3*d*n2
| *n5+656*n3*n5*n2^3+880*n1*n3^2*n2^2-1240*n1^3*n2*d-456*n5*n4*n1^2*n3*d+288*n5*
| n4*n1*n2^3+428*d^2*n5*n2^3-175*n2*d^5-812*d^3*n5*n2^2+1776*n1*n2*n3^2*n5-2584*
| n1*n2*n3^2*d-432*n3^3*d*n1+1344*n3*n4^2+6956*n2*n4*d^2+1328*n1^2*n3*n2^2+7684*
| n1*n2*n5*d^2+132*n3^3*n2*d^2-135*n1*d^5+48*n1*n5^4*n4+176*n3^2*n4^2*d^2+456*n1*
| n2^3*d^2-312*n2*n3^2*n4^2*d+1616*n3^2*n4+3040*n5^2*n4+1520*n5*n4^2+64*n5*n2^3*
| n4^2-80*d*n2^3*n4^2-8192*n3*n5*d*n1*n2+2088*n5*d^2*n3^2+1728*n1^2*n4*n5-2496*n1
| ^2*n4*d+1280*n5^3*n4+2128*n1^2*n2*n4-368*n4^3*d+688*n3^2*n5*n2^2-2240*n1*n3*d*
| n5*n2*n4-864*n1*n5*n4*d^3-920*n1*n2*n4*d^3-320*n5*n4^2*d^3-888*n2*n3*n5*n4^2*d+
| 912*n2^2*n4^2-48*n1*d*n3*n4^3+1136*n5^2*n3^2+4640*n3*n5*n4+4480*n3*n2*n4-8104*
| n5*d*n4-1824*d*n2^3+112*n2*n3^3*n4*n5-2154*n3*n4*d^3-2918*n5*n4*d^3-2766*n2*n4*
| d^3+649*n2*d^4*n5-400*d*n5*n2^3*n4+16*n4^3*n5^3+2768*n3^2*d^2-872*n3^2*d*n5*n2*
| n4+148*n3^2*d^4-1448*n1*d*n5*n2^2*n4+192*n2*n1^3*n4*n5-464*n2*n1^2*d*n3^2+2036*
| n3^2*d^2*n2+1136*n1*n2^3*n5+4204*n5*n2^2*d^2+688*n5^2*n2*n3^2+1392*n5^2*n2*n1^2
| +6364*n5*n2*n4*d^2-504*n3^3*d*n5+1056*n1*n5^3+1232*n1*n2^3+400*n1^3*n5+336*n1*
| n2*n3^3+352*n5^4+80*n1^3*n3^2+7008*n1*n3*n2*n5+2912*n3*n5^2*n4+2756*d^2*n1^2-
| 840*n1*n3*d*n5^2*n4+480*n3*n2^3*n4+960*n2*n5^2*n4^2+1136*n2*n5^3*n4+384*n5*n1^2
| *n3^2+144*n1^3*n5^2*n2+1120*n5^3*n3-2584*d*n5*n2*n3^2+784*n1*n2^3*n3+1172*d^2*
| n5*n2^2*n4+176*n3*n5*n4^3+1536*n5^2*n2^2*n4+656*n1*n4*n5^3+832*n4^2+356*n5^2*n4
| ^2*d^2+568*n1^2*n5*d^2*n3-512*n1^3*n2*d*n5+160*n1^3*n3*n4*n2+424*d^2*n3^3+240*
| n3^2*n5*n2^2*n4-512*n1*n2^2*d*n3^2-456*d*n5^3*n2*n3+32*n4^2*n5^4+1748*d^4-1008*
| n1*n2*d*n5*n3^2+176*n1*n4*n3^2*n5^2-176*d*n2*n3^3*n4+596*n2*n3*n4^2*d^2-360*n3^
| 2*n5*d*n2^2+384*n2*n1^2*n4*n5^2-1408*n1^2*n5*d*n3*n2+600*n1*n5*d^2*n3^2+256*n1*
| n5^3*n2^2+240*n1*n3^2*n4*n2^2+32*n1*n3*n5*n4^3+544*n1*n5^2*n2^2*n4-488*n3^3*n2*
| d+16*n1*n5^4*n3-12800*n5*n2*n1*d+944*n1^2*n5^2+224*n5*n4^3+42*d^6+1964*n2*n3*n5
| *n4*d^2+68*d^2*n2^4+16*n2*n4^4-618*n2*d^3*n1^2-136*d*n4*n5^4+96*n1^3*n2^3+160*
| n1*n3*n5^2*n4^2+16*n3*n2^4*n4+5920*n3*n5*n4*n2-8160*n3*n5*n4*d+112*n1*n2*n3^3*
| n5+64*n3*n5^4*n4+1584*n1*n5^2*n2*d^2+112*n3*n5^3*n2^2+4416*n1*n5*n4+3296*n1*n4*
| n3-3808*n1*d^3-848*d*n1^3-392*n5^2*n3*n4^2*d+96*n1*n2*n3^3*n4+80*n2*n5*n1^4+540
| *n5*n3*n4^2*d^2+208*n1^2*n3*n4^2+1552*n2*n3^2*n4*n5+880*n1^2*n3*n4*n5+1408*n1^2
| *n3*n4*n2-1408*n1^2*n3*n4*d+808*n3*n2^2*n4*d^2-384*n3^2*d^3*n2+116*n1*d^2*n3^3+
| 1562*n5*d^4+64*n5^2*n3^3*n4+1312*n1*n4*n3^2+2624*n1*n4*n2^2+8516*n2*n1*d^2+140*
| n1^3*d^2*n3+1792*n5^3*n2-3328*n3*d*n5^2*n4+2464*n2*n3*n4*n5^2-1672*n1*n5*n4^2*d
| -1736*n1*n2*n4^2*d-3104*n1*d*n5^2*n4-1184*n1*n3*n4^2*d-648*n3^2*n4^2*d+688*n3*
| n5^2*n4^2-906*d^3*n5^2*n2+16*n2^5+480*n3^3+1408*n5^3+1056*n2^3*d^2-344*d*n2*n4^
| 3-1096*n1^2*n2^2*n5*d+447*n3*d^4*n2+1124*n3*n5*n2^2*d^2-560*n2*n5^2*n4^2*d+840*
| n5^2*n2^2*d^2+80*n3^3*n1^2+32*n1*n3^4-1260*d^3*n5*n2*n3-344*d*n5*n2^3*n3+1004*
| n1^2*d^2*n3*n2-2336*n3*n4^2*d+3520*n5*n2^2*n4+2128*n5*n2*n4^2+1856*n5*n3*n1^2+
| 1872*n1^2*n2^2-596*d^3*n5^2*n1+400*n3^3*n4+592*n3^2*n4^2+400*n1*n3^3+352*n1^3*
| n4+656*n1^2*n3^2-3840*n1*n3*d*n2^2+5600*n1*n3*d^2*n2+524*n1^3*d^2-888*n3*n2*n4*
| d^3-2064*n1^2*n5*d*n3-2200*n1*n5*d*n3^2+16*n1^5+560*n1^2*n4*n5^2+160*n1^3*n4*n3
| -400*n1^3*n4*d+496*n1^3*n4*n2+536*n1^2*n5*n4*d^2-288*d*n1^2*n4*n5^2-136*n1^4*d+
| 112*n2*n5^4*n4-368*n1*d*n2^3*n4-312*n1*d*n2^2*n4^2-1184*n3*d*n5*n2^2*n4-56*n3^3
| *n2^2*d-48*d*n2^4*n4+4032*n5^2*n4*n2-5432*n5^2*n4*d-32*n1^3*n4^2*d-360*d*n1^2*
| n2^3+4352*n1*n2*n4-160*n3*d*n2*n4^3+944*n5^2*n3*n4*d^2+1760*n1^2*n2^2*n5+320*n1
| *n5^3*n3*n2+144*n2*n5^3*n4^2+48*n2*n5^2*n4^3+416*n2^2*n3*n4*n5^2+1469*n2*d^4-
| 384*d*n5^4-40*n1^2*n3^3*d+1552*n3*n2*n5*n4^2+656*n3*n2^2*n4^2+736*n3*n5^3*n4+
| 688*n2*n1^3*n3+784*n2*n1^2*n3^2-1208*n3*n5^3*d+192*n1^3*n2^2*n3-256*d*n3*n4*n2^
| 3+16*n4^4-168*d*n5^4*n2+272*n1^2*n5*n2^3+48*n2^2*n5^4+64*n1^2*n3*n4^2*n5+1728*
| n1^2*d^2*n3+584*n5^3*n2*d^2+519*n1*n2*d^4-1152*n5^2*n2^2*n1*d-688*n5^2*n2^2*d*
| n3+40*n1^4*d^2+1536*n1*n5^2*n3*n4-4648*n1*n5*n3*n4*d-1400*n2*n3*d*n5^2*n4-588*
| n3*n5^2*d^3-332*n3*d^3*n1^2+1380*n4*d^2*n5^2*n2+471*n1*d^4*n5+616*n5*n4*n3^2*d^
| 2+224*n3^2*n2*n5*n4^2+624*n1*n2^3*n4+544*n1*n2^2*n4^2+1728*n1*n2^2*n3*n4-2200*
| n5*n3^2*n4*d+1360*n5*n1*n4^2*n2-4088*d*n5*n2^2*n4-2864*d*n3*n4*n2^2+2128*n3*n5*
| n2^2*n4-2096*n3*n2*n4^2*d+1448*n1^2*n4*d^2-2052*n1*d^3*n4+3252*n1*n3*n4*d^2+
| 4508*n1*n5*n4*d^2+4660*n1*n2*n4*d^2-16*n4^4*d+560*n3^2*n2*n4^2-6856*n5*n2*n3*n4
| *d-2240*d*n2*n3^2*n4-948*n3*d^3*n1*n5+311*n3*n4*d^4+256*n1^2*n3^2*n4-704*n1*n2*
| n3^2*n4*d+512*n1*n2*n3^2*n4*n5-1008*n1*d*n3*n4*n2^2+640*n5^3*n2^2+80*n1*n3^2*n4
| ^2*n5+476*n1*n5*n4^2*d^2+504*n1*n2*n4^2*d^2-424*n5^2*n3^2*n4*d+96*n1^2*n5^2*n3*
| n4-464*n1*n3*n5*n4^2*d-16*n1^3*n4*n5^2+112*n3^3*n2^2+2864*n1*n2^2*n5*n3-5392*n1
| *n2^2*n5*d+16*d^2*n3^4-72*n1^3*n3*n5*d+48*n5^3*n2^3+144*n1^2*n2^3*n4+48*n1*n2^4
| *n4-292*n4*d^3*n3^2+96*n1^2*n2^2*n4^2+288*n2*n4*n3^2*n5^2-592*n1*n3*n2*n4^2*d+
| 304*n1*n5^2*n3^2*n2+48*n1*n5^2*n3^3+464*n1*n3*n2*n5*n4^2-16*n1*n3^4*d+1220*n3*
| n5^2*d^2*n2+64*n1^2*n2^4-728*n3^2*d*n1^2-1176*n3^2*d*n2^2+96*n1^2*n5^3+16*n1^3*
| n4^2*n5+1336*n3*n4^2*d^2+1620*d^2*n5*n2^2*n1+2100*n5*n1*n4*n2*d^2+32*n4*n1^2*n5
| ^3-152*n1*n5*n3^3*d+128*n1*n5^4+336*n1^2*n3*n4*n2^2+576*n1^2*n2^3+16*n1*n2^5+
| 632*n3^2*n2*n4*d^2+64*n1*n2^4*n3-80*d*n5*n2^4+256*n1^3*n2^2*n5-360*d*n5^2*n2*n3
| ^2+64*n1*n3^3*n4*n5-56*n5^2*n3^3*d+1152*n5^3*n2*n1+16*n2*n3^4*n4-16*n1^4*n4*d+
| 48*n1^4*n4*n2-16*n1^4*n4*n5-16*n3^4*n4*d+16*n3^4*n4*n5+160*n5*n1^3*n3-128*n1^4*
| n2*d+800*n1*n4*n3*n5^2*n2-416*n2*n1^3*n3*d-902*n5*n3*n4*d^3+384*n5^2*n2^2*n1^2+
| 4688*n5^2*n2*d^2+1040*n2^3+224*n2^4+324*n3^2*n2^2*d^2-16*n3^2*n5*n1^3+459*n3*d^
| 4*n5+352*n5*n1*n3^2*n2^2+140*n1^3*d^2*n5+192*n2^2*n1^2*n3^2+96*n3*n2^4-1064*n1^
| 2*n5^2*d-1176*n1*n5^3*d+3124*n1*n5^2*d^2+2092*n1^2*d^2*n5+64*n1^4*n2^2-16*n5^5*
| d+176*n3^2*n5^3-216*d*n1^2*n3*n5^2+112*n3^3*n5^2+16*n5^5*n4+96*n3^2*n4^2*n5^2-
| 64*n3*n5^4*d+48*n3*n5^4*n2+304*n1*n4^2*n5^2*n2-4410*n2*d^3*n5+1280*n5^2*n2^2*n3
| -2960*n5^2*n2^2*d+3004*n2*n1^2*d^2)
""".stripMargin)
val a12 = ring(
"""
| (16*n1^4*n2*n3+16*n1*n2^2*n3^2*d^2+12*d^3*
| n4^3-1136*d*n5^2*n2*n1^2-152*d^2*n2^3*n4+16*n1^3*n2*n3^2-56*n1^2*n2*n5*n3^2*d+
| 160*n1*n5^4*n2-128*n4*n2-208*n1*n3*n5*n2^2*n4+16*n1*n5^3*n3^2-32*n1*n2^4*d+16*
| n1*n3^2*n2^3-632*n1*n2^2*n5*d*n3-128*n1*d*n5^2*n2^3+48*n1*n3^2*d^2*n2+27*n2*n3*
| n1*d^4+48*n1^4*n5-32*n3^2*n4*n5-32*n3^2*n4*n2-208*n2*n5^3*n4*d^2+46*n1*n5^2*n4*
| d^3-16*n2^3*n4^3-32*n1^3*n3*n5^2*d-48*n1^3*n5*d^3-130*n2*n3*n1*n5*d^3-316*d^2*
| n5^3*n4+48*n1^2*n2^3*n3-128*n5^4*d*n1+16*n3^2*n4*d-400*n1*n5*d*n3+136*n1*d^2*n3
| -848*n1*n5^2*d+736*n1*d^2*n5-32*n1*n4^3-496*n1*d^3*n5+12*n5*d^2*n1^4-72*n3^2*d*
| n1^2*n5+320*n2*n1^2*n3-288*n1*n2*n4^2+32*n1*n2*n3^2-136*n4^2*d^2+48*n1^2*n5^4-
| 96*d*n1^3*n2^2-104*d*n1*n3*n5*n2^3+40*d^2*n5*n2*n1*n3^2+96*n1^3*n2^2-8*n1^4*n3*
| d*n2+97*d^4*n5*n1*n2-256*n1*n4*n5^2*d^2-48*n1*n4*n3*n5^3-8*n1^4*d*n5^2-48*n1^4*
| n5*d-136*n3*d^2*n4-64*n1*d+128*n1*n5-128*n1*n4+128*n1*n2+128*n1^2-128*n5*n4-32*
| n2^4*n4-16*n1^2*n2*n4^3-16*n1^3*n3*n4*d+208*n1^3*n5^2-16*n1^3*n3*d^3-72*d*n1^3*
| n2^2*n5+224*n1^2*n5*n2^2*n4-64*n1*n3*n2^2*n4^2-19*n1*n2*n4*d^4-24*d*n1^3*n4*n5^
| 2+36*n1^2*n5^2*n4*d^2-16*d*n1^2*n4*n5^3+16*d*n3*n5^4*n4-32*n5^2*n2*n1^2*n4^2+
| 736*n1*n2^2*n5+224*n1*n3*n2^2-32*n3*n5^3*n4^2-48*n2^2*n4^3+560*n5^2*n2*n1*n3+51
| *d^4*n1*n5^2-252*n2^2*n4^2*d^2-8*n1*n2^3*d*n3^2-48*n1*n2^2*n5*n3^2*d-256*d*n5^2
| *n2*n1^2*n3+48*n1^3*n5^3-592*n1^2*n2^2*d+104*n1*n4^2*d^3+640*d*n2^2*n4+384*d*n2
| *n4^2-48*n5*n4^3*d^2+72*n1*d*n5*n4^3-736*n5*d^2*n4-928*n2*n1^2*d-320*n1*n5*n4^2
| +632*n5*n2*n4*d^3+64*n4*d+208*n1^3*n2*n3*n5-16*n1^2*n4^3+96*n2*n3*n5^2*n4^2*d-
| 56*d*n1*n3^2*n5^2+16*n1^4*n5^2+176*n1*n2^3*n5*n3+16*n1^4*n3+56*n4^3*n5^2*d-224*
| n5^2*n2^3*n4+704*n1*n5*n4*d-288*n1*n5^2*n4-544*n1*n5*n4*n2-640*n1*n2^2*d+1552*d
| *n5*n4*n2+912*d*n4*n5^2*n2^2+688*d*n4*n5^3*n2+632*n5*n2^2*n4^2*d+140*n1^2*n2*n4
| *d^2+304*n3*n1^2*n5^2+32*n3^2*n5^2*n1^2+64*n1^3*n5^2*n3+10*d^3*n2*n4^3+172*n2*
| n4^2*d^3-1840*n2*n1^2*d*n5+120*n1*d*n5^3*n4+24*n2^3*n1^2*d^2-56*n1*d^4*n4-328*
| n1^2*n2*n5*n4*d-32*n5^2*n2^2*n4^3-51*n5^2*n4*d^4+48*n5*d*n2^2*n4^3+62*n5*n1*n4^
| 2*d^3-64*n1*n2*n5^3*n4^2+144*d*n2*n5^3*n4^2+44*n3*n1^3*d^2*n2-10*n5*n1*n3^2*d^3
| -38*n4^2*d^4+1084*d^2*n5*n2*n1^2+368*n1^2*n2^2*n3*n5+112*d*n3*n2^2*n4^2-480*n1*
| n2*d+448*n1^2*n5-416*n1^2*d+88*n1^2*n2*n4^2*d-32*n1*n3^2*n4*d^2-162*n5*n1*n2^2*
| d^3-96*n1*d*n5^4*n2-192*n1*d*n5^3*n2^2+256*n1*n2^2+34*n1*n2^2*d^4+16*n1^2*n3^2*
| n4*d-16*n1^2*n3^2*n4*n5+5*d^5*n4^2-138*n2*n4*d^4-16*n2*n5^3*n4^3-160*n5*n2^2*n3
| *n4^2-268*n1*n4^2*d^2-32*n2*n5^4*n4^2-64*n1*n3*d+128*n1*n3*n5+320*n1*n5^2+576*
| n1*n5*n2+128*n1^2*n3-512*n1*n5*d+128*d*n5*n2*n4^3-64*n1*n3*n4^2*d^2+56*d*n2^2*
| n4^3-80*n5*n2^2*n4^3+48*n1*n2^4*n5+64*n1*n2^3*n3*n5^2-128*n1*n4*n5^3*n2+256*n1*
| n5^2*n3+62*n5^3*n4*d^3-36*d^2*n5^4*n4+144*n2*n3*d*n5^3*n4-320*n5^3*n2^2*n4+624*
| n1*n3*n5*d^2*n2+300*n1*n3*n5^2*d^2-160*n2*n3*n5^2*n4^2+384*n1^2*n2+128*n1*n2*n3
| +176*n1*d^2-52*n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5*n2^4*d-128*d*n4*n1^3*n2-24*n1^2*n3*n4*d^2-88*n1^3*d^3+
| 38*n3*d^4*n1-584*n2^2*n4*d^2-208*n1*n5*n2^2*n4-48*d^2*n2*n4^3+56*n1*n3^2*n4*d-
| 64*n1*n3^2*n4*n5-128*n1*n3*n4^2*n5+480*n2*d*n4-128*n1*n4^2+128*n1^3+184*d*n5^3*
| n4^2+8*n2*n1^4*d^2+48*n2^3*n5*n1^2*n3-1648*d*n5^2*n2*n1+16*n1*n5^5-160*n1^3*n3*
| d-420*n3*n5*n4*d^2-396*n3*n2*n4*d^2-208*n2*n1^2*n4*d+240*n2*n1^2*n4*n5+16*n1^4*
| n4-24*d^2*n4^3+32*n1*n2^4-392*n1^2*d^3*n5+288*n1*n5^2*n4^2*d-72*n1^2*d^3*n3*n5+
| 20*n3^2*d^2*n5*n1^2+16*n1^3*n3*n4*n5-48*n3^2*n4*n2^2-512*n5*n2^2*n4^2-336*n5*n2
| ^3*n4+416*d*n2^2*n4^2+272*d*n2^3*n4-420*n5*n4^2*d^2-396*n2*n4^2*d^2-96*n5*n2*n4
| ^3-16*n2^2*n1^2*n3^2*d-32*n2*n4^3+432*n1^2*n2*n3*n5^2-704*n3*n5^2*d*n1*n2-160*
| n5*n4*d^4+46*n2*n1^2*d^4-64*n1*n2*n4^3-112*n5*n4^2*n1^2*n2+104*n5*n4^2*n1^2*d+
| 72*n1*n5*n3^2*n4*d-224*n1^3*n5^2*d+96*n3^2*n2*n1^2*n5+32*n1*n2^2*n3^2*n5^2-16*d
| *n3^2*n5^2*n1^2+160*n1*n5^3*n3+16*n1^2*n2*n3*n4*d-56*n1^2*n4^2*d^2+368*n2*n1^2*
| n5^3+752*n1*n2^2*n5^2-128*d*n1^3*n4*n5-32*n3*n2^3*n4^2+16*n1^4*n5*n3+432*n1^3*
| n2*n5-112*n2^3*n4^2-24*n3^2*n4*d^2-272*n1*n2^3*d+144*n5*n3*n4^2*d+200*n1^3*n2*d
| ^2-116*n1*n5^2*n2*n4*d^2+224*d*n5^2*n2^2*n4^2+48*d*n5^2*n2*n4^3-80*n1*n5^2*n4^2
| *d^2-192*n5*n2^2*n4^2*d^2-13*n3*n1*d^4*n4-32*n5*n1*n2^2*n4^3-4*n1^2*n3^2*n4*d^2
| +12*n3*n1*n4^2*d^3+32*n1*n5^3*n4^2*d+208*n5^2*n2*n4*d^3-12*n1*d^3*n3^2+32*n1^2*
| d^2*n3^2-16*n1^3*n3^2*d+144*n1^2*n2^2*n4-96*n1^2*n4^2*n5+104*n1^2*n4^2*d-104*d^
| 4*n4-160*n5^3*n4^2-48*n5^2*n4^3-384*n3*n2*n1*d+864*n1*n5^2*n2-200*n5*n1*n2*n4^2
| *d^2-8*n5*n1^3*n3*n4*d-64*n1*n5^2*n2*n3*n4^2+48*n1*n3^2*n2^2-368*n1^3*n2*d+32*
| n5*n4*n1^2*n3*d+32*n5*n4*n1*n2^3+96*n1*n2*n3^2*n5-72*n1*n2*n3^2*d-664*n2*n4*d^2
| +240*n1^2*n3*n2^2+16*n1*n5^2*n3^2*d^2+1508*n1*n2*n5*d^2-17*n1*n2*d^5-28*n1*d^5-
| 16*n1*n5^4*n4+152*n1*n2^3*d^2-24*n2^2*n1^3*n3*d-320*n5^2*n4-128*n5*n4^2-176*n5*
| n2^3*n4^2+128*d*n2^3*n4^2-968*n3*n5*d*n1*n2+64*n1^2*n4*n5-32*n1^2*n4*d-288*n5^3
| *n4+96*n1^2*n2*n4+16*n4^3*d+552*n1*n3*d*n5*n2*n4+168*n5*n1*d*n2^2*n4^2+8*n3*n1^
| 2*n2*n5*n4*d-160*n5*n1*n3*n2*n4*d^2+208*n1*n5*n4*d^3+148*n1*n2*n4*d^3+184*n5*n4
| ^2*d^3+256*n2*n3*n5*n4^2*d-224*n2^2*n4^2-128*n3*n5*n4-128*n3*n2*n4+512*n5*d*n4+
| 108*n1*n5*d^2*n2^3-120*n1^3*n2*d*n3*n5-24*n1^3*n5^3*d+32*n5*n1^2*n3^2*n2^2+108*
| n3*n4*d^3+496*n5*n4*d^3+436*n2*n4*d^3+8*n1*n2^4*d^2+384*d*n5*n2^3*n4-16*n4^3*n5
| ^3+128*n3^2*d*n5*n2*n4+184*n1*d*n5*n2^2*n4+160*n2*n1^3*n4*n5-72*n2*n1^2*d*n3^2+
| 36*n5*n1^3*n4*d^2+336*n1*n2^3*n5+960*n5^2*n2*n1^2-1508*n5*n2*n4*d^2+288*n1*n5^3
| +160*n1*n2^3+288*n1^3*n5+16*n1^3*n3^2+108*n5*n1^2*n2*n4*d^2+16*n1*n5^2*n3^2*n4*
| d+16*n1*d*n2^2*n4^3+20*n3*n2*n4^2*d^3+50*n3*n2^2*n4*d^3-20*n5*n1*d^2*n4^3-28*n5
| *n1^2*n4^2*d^2+162*n5*n2^2*n4*d^3+10*n5*n3^2*n4*d^3-20*n1*n2*n4^3*d^2-60*n1*n2^
| 2*n4^2*d^2+480*n1*n3*n2*n5-256*n3*n5^2*n4+520*d^2*n1^2+232*n1*n3*d*n5^2*n4-112*
| n3*n2^3*n4-560*n2*n5^2*n4^2-560*n2*n5^3*n4+64*n5*n1^2*n3^2+256*n1^3*n5^2*n2+36*
| n5^4*d^2*n1+112*n1*n2^3*n3-820*d^2*n5*n2^2*n4-752*n5^2*n2^2*n4-112*n1*n4*n5^3-
| 300*n5^2*n4^2*d^2+372*n1^2*n5*d^2*n3-480*n1^3*n2*d*n5+16*n1^3*n3*n4*n2-80*n3^2*
| n5*n2^2*n4-56*n1*n2^2*d*n3^2-32*n4^2*n5^4-128*n1*n2*d*n5*n3^2-32*n1*n4*n3^2*n5^
| 2-96*n2*n3*n4^2*d^2+176*n2*n1^2*n4*n5^2-808*n1^2*n5*d*n3*n2+48*n1*n5*d^2*n3^2+
| 320*n1*n5^3*n2^2-32*n1*n3^2*n4*n2^2-96*n1*n5^2*n2^2*n4+120*n5*n1*d*n3*n4*n2^2+
| 32*n1*n5^4*n3-1552*n5*n2*n1*d+544*n1^2*n5^2-32*n5*n4^3+216*n3*n5^2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5*n1^2*n2*n3*n4^2+64*n5*n1^2*n2*n4^2*
| d-16*n3^2*n5^2*n4*d^2-16*n3^2*n2^2*n4*d^2-272*d^2*n5^2*n2^2*n4+340*n1^2*d^2*n3*
| n2+32*n3*n4^2*d-736*n5*n2^2*n4-480*n5*n2*n4^2+352*n5*n3*n1^2+352*n1^2*n2^2-336*
| d^3*n5^2*n1+64*n1^3*n4+32*n1^2*n3^2-416*n1*n3*d*n2^2+396*n1*n3*d^2*n2+240*n1^3*
| d^2+16*n1^3*n2*n5*n3^2+36*n1*d^2*n3*n2^3-62*n1*n5^3*d^3-8*n1*n5^5*d+172*n3*n2*
| n4*d^3-632*n1^2*n5*d*n3-72*n1*n5*d*n3^2-11*n1^2*d^5+96*n1^2*n4*n5^2+16*n1^3*n4*
| n3-112*n1^3*n4*d+112*n1^3*n4*n2+108*n1^2*n5*n4*d^2-120*d*n1^2*n4*n5^2-48*n1^4*d
| -160*n2*n5^4*n4-32*n1*d*n2^3*n4+216*n1*d*n2^2*n4^2+632*n3*d*n5*n2^2*n4-16*n1*n5
| ^4*d*n3+32*d*n2^4*n4-864*n5^2*n4*n2+848*n5^2*n4*d-96*d*n1^2*n2^3-24*n1^2*d*n5^4
| -256*n1*n2*n4+48*n2*n1^3*n5^3-300*n5^2*n3*n4*d^2+720*n1^2*n2^2*n5+240*n1*n5^3*
| n3*n2+48*n1*n5^4*n2^2+16*n1*n5^5*n2-240*n2*n5^3*n4^2-80*n2*n5^2*n4^3-368*n2^2*
| n3*n4*n5^2-192*n3*n2*n5*n4^2-96*n3*n2^2*n4^2-160*n3*n5^3*n4+144*n2*n1^3*n3+64*
| n2*n1^2*n3^2+48*n1^3*n2^2*n3+96*n1^2*n5^3*n2^2+128*d*n3*n4*n2^3+144*n1^2*n5*n2^
| 3-32*n1^2*n3*n4^2*n5+292*n1^2*d^2*n3+64*n1^3*n5^2*n2*n3+138*n1*n2*d^4-912*n5^2*
| n2^2*n1*d+16*n5*n1^2*n2^2*n3*n4+16*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*n5^2*n2^
| 2-960*n1^2*n5^2*d-528*n1*n5^3*d+812*n1*n5^2*d^2+996*n1^2*d^2*n5+332*n1^2*n5^2*d
| ^2*n2+104*n5*n3*n2^3*n4*d-106*n1^2*d^3*n5^2+60*n1^3*n5^2*d^2-8*n1*n5^3*d*n3^2-
| 16*n1*n5^3*n2^2*n4+16*d*n1*n2^3*n4^2-16*n2*n5^5*n4-20*n1*n5*d^5-16*n3*n1*n5*n2^
| 3*n4-32*n5*n1*n3^2*n2^2*n4-210*n1^2*n2*n5*d^3+240*n1^2*n2*n3*d^2*n5-344*d*n1^2*
| n3*n5^2-8*n1*d*n2^4*n4+48*n1^3*n5*n2^2*n4-64*n3*n5^2*n2^3*n4+128*d*n5^2*n2^3*n4
| -32*n3^2*n5^2*n2^2*n4+36*n2*n1^3*n4*d^2-16*n5^5*n4+40*n1*d*n5^2*n2^2*n4+24*n3*
| n1*d*n5^3*n4+48*n5*d*n3^2*n4*n2^2-66*n1^2*d^3*n3*n2-352*n1*n4^2*n5^2*n2+96*n5*
| n3*n2^2*n4^2*d-40*n5*n1*n3*n4^2*d^2+824*n2*n1^2*d^2+16*n1*n2^4*n3*n5)
""".stripMargin)
val a13 = ring(
"""
| (192+
| 368*n1+560*n2+432*n3+240*n4+608*n5-656*d+136*n5^2*n2^3+592*n4*n2+73*d^4*n3+232*
| n3^2*n4*n5+256*n3^2*n4*n2-272*n3^2*n4*d-1128*n1*n5*d*n3+682*n1*d^2*n3-840*n1*n5
| ^2*d+1044*n1*d^2*n5+8*n1*n4^3-214*n1*d^3*n5-520*n5^3*d+328*n2*n1^2*n3+152*n1*n2
| *n4^2+344*n1*n2*n3^2-284*n5*n2^3*d+122*n4^2*d^2+926*d^2*n5^2-140*n3^3*d+32*n1^3
| *n2^2+56*n5*n2^4+512*n3*d^2*n4-980*n1*d+864*n1*n5+400*n1*n4+880*n1*n2+248*n1^2+
| 592*n1*n3-1140*n3*d+1056*n3*n5+432*n3*n4+976*n3*n2+344*n3^2-1640*n5*d+736*n5^2+
| 608*n5*n4+1440*n5*n2-1524*n2*d+24*n2^4*n4-468*n3*d^3+896*n1*n2^2*n5+560*n1*n3*
| n2^2+8*n2^2*n4^3+288*n5^2*n2*n1*n3-620*n5^2*n2*d*n3-172*n1^2*n2^2*d-688*d*n2^2*
| n4-248*d*n2*n4^2+768*n5*d^2*n4-600*n2*n1^2*d+112*n1*n5*n4^2-660*n4*d+744*n5^2*
| n2^2-788*n1*n5*n4*d+304*n1*n5^2*n4+800*n1*n5*n4*n2-968*n1*n2^2*d+888*d^2-1440*d
| *n5*n4*n2+16*n3*n1^2*n5^2-312*n2*n1^2*d*n5+8*n3^4*n5-2872*d*n5*n2-1736*n1*n2*d+
| 592*n3^2*n5+368*n1^2*n5-472*n1^2*d+552*n3^2*n2-648*n3^2*d+776*n3*n2^2-1896*n3*
| n2*d+744*n1*n2^2+296*n1*n3^2+1530*n2*d^2+1628*n5*d^2+840*n2^2*d^2+42*n1*n4^2*d^
| 2+1216*n5*n2^2+1312*n5^2*n2-1448*n5^2*d-1112*n1*n3*d+944*n1*n3*n5-1272*d*n2^2+
| 688*n1*n5^2+1568*n1*n5*n2+248*n1^2*n3-1664*n1*n5*d+896*n3*n5^2+432*n1*n5^2*n3+
| 632*n2^2+472*n1^2*n2+1776*n3*n5*n2-2024*n3*n5*d+1106*n3*d^2+1024*n1*n2*n3+958*
| n1*d^2-80*d*n1^2*n4*n5+24*n1^2*n4^2*n2+8*n3^2*n4^2*n5+16*n5^4*n4-180*n5^2*d*n3^
| 2+112*n3*n5*n4^2+64*n1*n3*n4^2-440*n5*d*n1^2+64*n1*d^4+632*n5*n3^2*n2+440*n5*n2
| ^3+1104*n5*n2*n4-760*n1*d*n4-260*n1*n2^2*n4*d-4*d*n5*n4^3-304*n1*n2*n3*n4*d+48*
| n1*n2*n3*n4^2+72*n1*n2*n3^2*n4-824*n3*d*n4-1600*n5*n2^2*d-239*n2*d^3*n1-500*n1*
| n2*n5*n4*d-904*n1*n2*n4*d+160*n2*n1^2*n3*n5-200*n2*n1^2*n3*d-1000*n3*n2^2*d+
| 1212*n3*d^2*n2+1266*n3*d^2*n5+1008*n3*n5^2*n2-1100*n3*n5^2*d+16*n1*n3^3*n5-240*
| n1*n5^2*d*n3+330*n1*n5*d^2*n3+208*n1*n5^2*n2*n4-100*d*n5^3*n4-44*n5^2*n4^2*d-
| 404*n2*n5^2*n4*d-1700*d*n5^2*n2+32*n1^2*n4^2+64*n3^3*n2*n5+700*n3*n5*d^2*n2+944
| *n5*n3*n2^2-704*n5*d^3+8*n5^5+384*n1*n4*n3*n5+504*n1^2*n2*n5-488*n1*n3*n4*d+88*
| n1^2*n3*n4+48*n3^2*n2^3+1878*n5*d^2*n2-25*d^5+32*n3*n5^4-716*n5*n3^2*d-168*n3*
| n2^3*d-688*d*n3^2*n2+120*n3^3*n2-936*n3*n2*n4*d+152*n3*n2*n4^2+408*n3*n2^2*n4-
| 182*n2^2*d^3+16*n1*n5^2*n4^2-4*d*n1*n4^3+256*n1*n2*n3*n4*n5+198*n5^2*n4*d^2+48*
| n3^2*n4*n5^2-312*d*n5^3*n2+288*n3^2*n2^2+8*n1^4-184*n4^2*d+662*n4*d^2+184*n2*n4
| ^2+272*n1*n5*n3^2-288*n3*d*n1^2-144*n1*n4^2*d-26*n4^2*d^3-80*n3^2*d^3-140*n5*n2
| *n4^2*d+472*n1*d^2*n4-24*n1^3*d*n5+8*n4^3+98*n1*d^2*n3^2-137*n1*d^3*n3+310*n1*
| n2^2*d^2+158*n5^3*d^2+192*n4*n2^3-344*n1*n3^2*d-288*d^3*n4+8*n3*n4^3+32*n3*n1^3
| -8*n3^4*d+8*n1^4*n2+104*n1^3*n2+80*n5^2*n4^2-592*d^3+330*n3*d^2*n5^2+520*n4*n2^
| 2+496*n1*n4*n2*n3-204*n5*n4^2*d-672*d^3*n2-59*d^3*n1^2+48*n3^2*n1*n5^2+224*n2^2
| *n4*d^2+240*n1*n5*n2^2*n4-52*n1*n3^2*n4*d+32*n1*n3^2*n4*n5+16*n1*n3*n4^2*n5-
| 1192*n2*d*n4+184*n1^2*n4+120*n1*n4^2+72*n1^3-540*d*n5^2*n2*n1-255*n3*d^3*n2+264
| *n3*n2^3-16*n1^3*n3*d+318*n3*d^2*n2^2+264*n3*n5*n4*d^2+294*n3*n2*n4*d^2-148*n2*
| n1^2*n4*d+120*n2*n1^2*n4*n5+24*n2*n3^3*n4+8*n3*n2*n4^3+4*d^2*n4^3+32*n1*n2^4+8*
| n2*n3^4+64*n5^4*n2+176*n3*n2*n5^3-193*d^3*n5^2-56*n2^4*d+72*n3^2*n4*n2^2-20*n3^
| 3*n4*d+16*n3^3*n4*n5+72*n5*n2^2*n4^2+120*n5*n2^3*n4-80*d*n2^2*n4^2-124*d*n2^3*
| n4+62*n5*n4^2*d^2+82*n2*n4^2*d^2+8*n5*n2*n4^3+128*n3^3*n5+16*n2*n4^3-596*n3*n5*
| d*n2^2-4*d*n3*n4^3+8*n1*n2*n4^3+16*n3^4+48*n1*n5^3*n3-259*n5*n3*d^3+256*n1*n2^2
| *n5^2+48*n1^3*n2*n5+24*n2^3*n4^2+78*n3^2*n4*d^2-168*n1*n2^3*d-60*n5*n3*n4^2*d+
| 72*n1^2*n2^2*n4+8*n1^2*n4^2*n5-16*n1^2*n4^2*d+46*d^4*n4+8*n5^3*n4^2-1288*n3*n2*
| n1*d+864*n1*n5^2*n2-2244*n3*d*n2*n5+160*n3*n5*n2^3+96*n1*n3^2*n2^2-64*n1^3*n2*d
| +176*n1*n2*n3^2*n5-208*n1*n2*n3^2*d-24*n3^3*d*n1+120*n3*n4^2+786*n2*n4*d^2+96*
| n1^2*n3*n2^2+636*n1*n2*n5*d^2+232*n3^2*n4+528*n5^2*n4+160*n5*n4^2-696*n3*n5*d*
| n1*n2+212*n5*d^2*n3^2+152*n1^2*n4*n5-216*n1^2*n4*d+176*n5^3*n4+240*n1^2*n2*n4-
| 12*n4^3*d+168*n3^2*n5*n2^2+120*n2^2*n4^2+312*n5^2*n3^2+736*n3*n5*n4+736*n3*n2*
| n4-1200*n5*d*n4-452*d*n2^3-104*n3*n4*d^3-160*n5*n4*d^3-170*n2*n4*d^3+398*n3^2*d
| ^2+212*n3^2*d^2*n2+160*n1*n2^3*n5+518*n5*n2^2*d^2+168*n5^2*n2*n3^2+120*n5^2*n2*
| n1^2+462*n5*n2*n4*d^2-72*n3^3*d*n5+208*n1*n5^3+264*n1*n2^3+48*n1^3*n5+32*n1*n2*
| n3^3+104*n5^4+1136*n1*n3*n2*n5+368*n3*n5^2*n4+292*d^2*n1^2+72*n3*n2^3*n4+56*n2*
| n5^2*n4^2+112*n2*n5^3*n4+8*n5*n1^2*n3^2+304*n5^3*n3-384*d*n5*n2*n3^2+96*n1*n2^3
| *n3+192*n5^2*n2^2*n4+32*n1*n4*n5^3+88*n4^2+40*d^2*n3^3+194*d^4-72*n3^3*n2*d-
| 2012*n5*n2*n1*d+144*n1^2*n5^2+8*n5*n4^3+848*n3*n5*n4*n2-892*n3*n5*n4*d+656*n1*
| n5*n4+416*n1*n4*n3-408*n1*d^3-84*d*n1^3+136*n2*n3^2*n4*n5+16*n1^2*n3*n4*n5+72*
| n1^2*n3*n4*n2-44*n1^2*n3*n4*d+112*n5*d^4+104*n1*n4*n3^2+408*n1*n4*n2^2+1124*n2*
| n1*d^2+496*n5^3*n2-208*n3*d*n5^2*n4+224*n2*n3*n4*n5^2-60*n1*n5*n4^2*d-96*n1*n2*
| n4^2*d-168*n1*d*n5^2*n4-32*n1*n3*n4^2*d-16*n3^2*n4^2*d+16*n3*n5^2*n4^2+8*n2^5+
| 120*n3^3+416*n5^3+146*n2^3*d^2-12*d*n2*n4^3-144*n3*n4^2*d+648*n5*n2^2*n4+216*n5
| *n2*n4^2+192*n5*n3*n1^2+272*n1^2*n2^2+40*n3^3*n4+32*n3^2*n4^2+48*n1*n3^3+24*n1^
| 3*n4+56*n1^2*n3^2-352*n1*n3*d*n2^2+400*n1*n3*d^2*n2+24*n1^3*d^2-100*n1^2*n5*d*
| n3-148*n1*n5*d*n3^2+16*n1^2*n4*n5^2-12*n1^3*n4*d+24*n1^3*n4*n2-4*n1^4*d+640*n5^
| 2*n4*n2-656*n5^2*n4*d+704*n1*n2*n4+152*n1^2*n2^2*n5+109*n2*d^4-60*d*n5^4+80*n3*
| n2*n5*n4^2+48*n3*n2^2*n4^2+48*n3*n5^3*n4+32*n2*n1^3*n3+48*n2*n1^2*n3^2-176*n3*
| n5^3*d+82*n1^2*d^2*n3+64*n1*n5^2*n3*n4-208*n1*n5*n3*n4*d+72*n1*n2^3*n4+48*n1*n2
| ^2*n4^2+144*n1*n2^2*n3*n4-128*n5*n3^2*n4*d+80*n5*n1*n4^2*n2-420*d*n5*n2^2*n4-
| 260*d*n3*n4*n2^2+240*n3*n5*n2^2*n4-96*n3*n2*n4^2*d+62*n1^2*n4*d^2-96*n1*d^3*n4+
| 140*n1*n3*n4*d^2+232*n1*n5*n4*d^2+286*n1*n2*n4*d^2+24*n3^2*n2*n4^2-524*n5*n2*n3
| *n4*d-156*d*n2*n3^2*n4+144*n5^3*n2^2+32*n3^3*n2^2+320*n1*n2^2*n5*n3-572*n1*n2^2
| *n5*d-28*n3^2*d*n1^2-180*n3^2*d*n2^2+8*n1^2*n5^3+42*n3*n4^2*d^2+16*n1*n5^4+48*
| n1^2*n2^3+144*n5^3*n2*n1+542*n5^2*n2*d^2+344*n2^3+88*n2^4+32*n3*n2^4-76*n1^2*n5
| ^2*d-116*n1*n5^3*d+250*n1*n5^2*d^2+128*n1^2*d^2*n5+48*n3^2*n5^3+32*n3^3*n5^2-
| 403*n2*d^3*n5+272*n5^2*n2^2*n3-480*n5^2*n2^2*d+188*n2*n1^2*d^2)
""".stripMargin)
val a14 = ring(
"""
| (32*n1+32*n2+32
| *n5-16*d+8*n5^2*n2^3+16*n4*n2+d^4*n3-36*n1*n5*d*n3+16*n1*d^2*n3-68*n1*n5^2*d+72
| *n1*d^2*n5-13*n1*d^3*n5-44*n5^3*d+8*n2*n1^2*n3-12*n5*n2^3*d+68*d^2*n5^2-72*n1*d
| +80*n1*n5+16*n1*n4+64*n1*n2+16*n1^2+16*n1*n3-8*n3*d+16*n3*n5+16*n3*n2-96*n5*d+
| 64*n5^2+16*n5*n4+112*n5*n2-88*n2*d-6*n3*d^3+48*n1*n2^2*n5+16*n1*n3*n2^2+16*n5^2
| *n2*n1*n3-24*n5^2*n2*d*n3-28*d*n2^2*n4+24*n5*d^2*n4-16*n2*n1^2*d-8*n4*d+72*n5^2
| *n2^2-36*n1*n5*n4*d+16*n1*n5^2*n4+48*n1*n5*n4*n2-32*n1*n2^2*d+32*d^2-64*d*n5*n4
| *n2-12*n2*n1^2*d*n5-212*d*n5*n2-104*n1*n2*d+24*n1^2*n5-24*n1^2*d+24*n3*n2^2-36*
| n3*n2*d+32*n1*n2^2+84*n2*d^2+96*n5*d^2+44*n2^2*d^2+104*n5*n2^2+128*n5^2*n2-116*
| n5^2*d-28*n1*n3*d+32*n1*n3*n5-80*d*n2^2+64*n1*n5^2+128*n1*n5*n2+8*n1^2*n3-132*
| n1*n5*d+24*n3*n5^2+16*n1*n5^2*n3+48*n2^2+16*n1^2*n2+48*n3*n5*n2-36*n3*n5*d+12*
| n3*d^2+32*n1*n2*n3+60*n1*d^2-4*d*n1^2*n4*n5-24*n5*d*n1^2+3*n1*d^4+24*n5*n2^3+48
| *n5*n2*n4-28*n1*d*n4-8*n1*n2^2*n4*d-116*n5*n2^2*d-10*n2*d^3*n1-28*n1*n2*n5*n4*d
| -36*n1*n2*n4*d+8*n2*n1^2*n3*n5-4*n2*n1^2*n3*d-28*n3*n2^2*d+24*n3*d^2*n2+24*n3*d
| ^2*n5+40*n3*n5^2*n2-28*n3*n5^2*d-8*n1*n5^2*d*n3+10*n1*n5*d^2*n3+16*n1*n5^2*n2*
| n4-4*d*n5^3*n4-24*n2*n5^2*n4*d-152*d*n5^2*n2+20*n3*n5*d^2*n2+40*n5*n3*n2^2-40*
| n5*d^3+24*n1^2*n2*n5+128*n5*d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^2*n3*n4-48*n3*n2*n4*d+32
| *n3*n2*n4^2+16*n3*n2^2*n4-20*n4^2*d+18*n4*d^2+40*n1*n5*n3^2-56*n3*d*n1^2-48*n1*
| n4^2*d+36*n1*d^2*n4-44*n1*n3^2*d-9*d^3*n4+16*n3*n4^3+16*n3*n1^3+8*n1^3*n2+32*n5
| ^2*n4^2+72*n1*n4*n2*n3-52*n5*n4^2*d-20*n2*d*n4+40*n1^2*n4+40*n1*n4^2+16*n1^3-92
| *n3*n2*n1*d+32*n1*n5^2*n2+40*n3*n4^2+18*n2*n4*d^2+24*n3^2*n4+40*n5^2*n4+40*n5*
| n4^2+40*n1^2*n4*n5-40*n1^2*n4*d+16*n5^3*n4+48*n1^2*n2*n4-8*n4^3*d+64*n3*n5*n4+
| 40*n3*n2*n4-56*n5*d*n4+8*n1*n5^3+16*n1*n2^3+8*n1^3*n5+88*n1*n3*n2*n5+40*n3*n5^2
| *n4+24*d^2*n1^2-72*n5*n2*n1*d+16*n1^2*n5^2+16*n5*n4^3+56*n3*n5*n4*n2-72*n3*n5*
| n4*d+80*n1*n5*n4+64*n1*n4*n3-9*n1*d^3-12*d*n1^3+40*n1*n4*n3^2+32*n1*n4*n2^2+36*
| n2*n1*d^2-48*n3*n4^2*d+16*n5*n2^2*n4+32*n5*n2*n4^2+48*n5*n3*n1^2+24*n1^2*n2^2+8
| *n3^3*n4+24*n3^2*n4^2+16*n1*n3^3+8*n1^3*n4+32*n1^2*n3^2+32*n5^2*n4*n2-44*n5^2*
| n4*d+56*n1*n2*n4)
""".stripMargin)
val c2 = ring(
"""
| (768+
| 48*n1^4*n2*n3-72*d^3*n4^3+1344*n1+2112*n2+1728*n3+1728*n4+2304*n5-2944*d-272*d*
| n5^2*n2^3+275*n2^2*d^4-512*d*n5^2*n2*n1^2+340*d^2*n2^3*n4+48*n1^3*n2*n3^2+512*
| n5^2*n2^3+48*n1^3*n2*n4^2+32*n1*n5^4*n2+16*n3*n2^4*n5+4000*n4*n2+768*n1*n3*n5*
| n2^2*n4+1125*d^4*n3-48*n1*n5^3*n3^2-120*n1*n2^4*d+48*n1*n3^2*n2^3-1096*n1*n2^2*
| n5*d*n3+416*n1*n3^2*d^2*n2+64*n3^2*n2^2*n5^2+32*n1^4*n5+3008*n3^2*n4*n5+2944*n3
| ^2*n4*n2-8*n1^5*d+620*d^2*n5^3*n4+144*n1^2*n2^3*n3+24*n5^4*d*n1-4000*n3^2*n4*d-
| 5560*n1*n5*d*n3+4320*n1*d^2*n3-3608*n1*n5^2*d+6012*n1*d^2*n5+256*n1*n4^3-2330*
| n1*d^3*n5-2432*n5^3*d+40*n3^2*d*n1^2*n5-48*n3*n2^4*d+1536*n2*n1^2*n3+1824*n1*n2
| *n4^2+1248*n1*n2*n3^2-1536*n5*n2^3*d+2912*n4^2*d^2-48*n1^2*n5^4-320*d*n1^3*n2^2
| +5576*d^2*n5^2+64*n3*n5^2*n4^3-784*n3^3*d+496*n1^3*n2^2+160*n5*n2^4+876*n1*n4*
| n5^2*d^2+160*n1*n4*n3*n5^3-16*n1^4*n5*d+7456*n3*d^2*n4-4064*n1*d+2912*n1*n5+
| 2464*n1*n4+2944*n1*n2+768*n1^2+2144*n1*n3-5312*n3*d+4000*n3*n5+3456*n3*n4+3680*
| n3*n2+1376*n3^2-7136*n5*d+2624*n5^2+4256*n5*n4+5088*n5*n2-6560*n2*d+128*n2^4*n4
| +16*n1^2*n2*n4^3-48*n1^3*n3*n4*d-64*n1^3*n5^2-3824*n3*d^3+712*n3^2*n5*d^2*n2+
| 416*n1^2*n5*n2^2*n4+240*n1*n3*n2^2*n4^2+3408*n1*n2^2*n5+2240*n1*n3*n2^2+192*n3*
| n5^3*n4^2+160*n2^2*n4^3+1472*n5^2*n2*n1*n3-4368*n5^2*n2*d*n3+432*n2^2*n4^2*d^2-
| 48*n1^3*n5^3-184*n5*d^5-1840*n1^2*n2^2*d-268*n1*n4^2*d^3-5744*d*n2^2*n4-4352*d*
| n2*n4^2+140*n5*n4^3*d^2-128*n1*d*n5*n4^3+9548*n5*d^2*n4-3312*n2*n1^2*d+1904*n1*
| n5*n4^2+64*n3^3*n4^2*n5-1630*n5*n2*n4*d^3-5440*n4*d+160*n1^3*n2*n3*n5+48*n1^3*
| n4^2+48*n1^2*n4^3+2576*n5^2*n2^2-16*d*n1*n3^2*n5^2-16*n1^4*n5^2+224*n1*n2^3*n5*
| n3+32*n3^2*n5*n4^3+32*n1^4*n3-104*n4^3*n5^2*d+208*n5^2*n2^3*n4-7768*n1*n5*n4*d+
| 2720*n1*n5^2*n4+6048*n1*n5*n4*n2-4592*n1*n2^2*d+4624*d^2-352*n5^3*n2^2*d-13992*
| d*n5*n4*n2-1192*d*n4*n5^2*n2^2-944*d*n4*n5^3*n2-16*d*n3*n4^4-680*n5*n2^2*n4^2*d
| +672*n1^2*n2*n4*d^2-128*n3*n1^2*n5^2+80*n3*n5^2*n2^3-80*n3^2*n5^2*n1^2+16*n1*n2
| ^2*n3^3-80*n1^3*n5^2*n3-490*n2*n4^2*d^3-2864*n2*n1^2*d*n5-360*n1*d*n5^3*n4+299*
| n1*d^4*n4-936*n1^2*n2*n5*n4*d-64*d*n3^2*n4^3+314*n5^2*d^4+96*n1*n3*n2*n4^3+168*
| n4^2*d^4+904*d^2*n5*n2*n1^2+384*n1^2*n2^2*n3*n5-624*d*n3*n2^2*n4^2+32*n3^4*n5-
| 112*n3^3*n2*d*n5-12360*d*n5*n2-7200*n1*n2*d+2224*n3^2*n5+1104*n1^2*n5-1872*n1^2
| *d-264*n1^2*n2*n4^2*d+392*n1*n3^2*n4*d^2-80*n1*n3^3*n4*d+2064*n3^2*n2-3208*n3^2
| *d+2816*n3*n2^2-8824*n3*n2*d+2480*n1*n2^2+1040*n1*n3^2+8052*n2*d^2+8712*n5*d^2-
| 80*n1^2*n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+4728*n2^2*d^2+521*n2*n4*d^4+
| 496*n5*n2^2*n3*n4^2+1412*n1*n4^2*d^2+96*n3*n2^2*n4^3-260*d^3*n5^3+4048*n5*n2^2+
| 4512*n5^2*n2-6288*n5^2*d-4984*n1*n3*d+3328*n1*n3*n5-5264*d*n2^2+2144*n1*n5^2+
| 5280*n1*n5*n2+832*n1^2*n3-6856*n1*n5*d+3296*n3*n5^2-224*d*n5*n2*n4^3+428*n1*n3*
| n4^2*d^2-80*d*n2^2*n4^3+48*n5*n2^2*n4^3+80*n1*n2^4*n5+352*n1*n4*n5^3*n2+1440*n1
| *n5^2*n3+304*n5^3*n2^2*n4+1500*n1*n3*n5*d^2*n2+192*d^2*n3^3*n4+2176*n2^2+356*n1
| *n3*n5^2*d^2+624*n2*n3*n5^2*n4^2+1712*n1^2*n2+6528*n3*n5*n2-9496*n3*n5*d+6420*
| n3*d^2+3648*n1*n2*n3+4884*n1*d^2+592*n1^2*n2^2*d^2-1424*d*n1^2*n4*n5+80*n1^3*n4
| *n5+448*n1^2*n4^2*n2+320*n1*n3^2*n4^2+160*n1*n3^3*n4+160*n1*n3*n4^3+864*n3^2*n4
| ^2*n5+384*n5^4*n4-844*n5^2*n4*d^3+192*n1*n2*n3^2*n4^2-764*n1*n2*d^3*n3-336*n1*
| n2^3*d*n3+192*n2^2*n3^2*n4^2-1216*n5^2*d*n3^2-1144*n1*n2*d^3*n5-544*n1*n2^3*d*
| n5+808*n1*n2^2*d^2*n3-480*n5*n3^2*d*n4^2+2880*n3*n5*n4^2+1408*n1*n3*n4^2-1936*
| n5*d*n1^2+869*n1*d^4+2320*n5*n3^2*n2+1360*n5*n2^3+16*n1*n2^2*n4^3+176*n5^2*n2^3
| *n1+32*n2*n3*n4^4-16*n2*n4^4*d-80*n3^3*n4^2*d+7744*n5*n2*n4-5896*n1*d*n4-3128*
| n1*n2^2*n4*d-488*d*n5*n4^3-5152*n1*n2*n3*n4*d+1328*n1*n2*n3*n4^2+1232*n1*n2*n3^
| 2*n4-8352*n3*d*n4-131*n3*d^5-7184*n5*n2^2*d-2676*n2*d^3*n1-76*n3^3*d^3+128*n5^3
| *d^2*n1-7152*n1*n2*n5*n4*d-7824*n1*n2*n4*d+48*n5*n2^4*n4-16*n5*n3^4*d+16*n2*n5^
| 5-384*n1*n2*d*n5^3+1184*n2*n1^2*n3*n5-1928*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-384
| *n3^2*d^3*n5+448*n1^2*n2*n3*n4*n5+224*n2*n3*n5*n4^3+96*n2*n3^3*n4^2-4928*n3*n2^
| 2*d+96*n3^3*n4*n2^2+96*n3^2*n4*n2^3+7848*n3*d^2*n2+320*n1*n3*n2^2*n5^2+8332*n3*
| d^2*n5-544*n1^2*n3*n2^2*d+3872*n3*n5^2*n2-5624*n3*n5^2*d+96*n1^2*n5^3*d+48*n1*
| n3^3*n5+64*n1^2*n5^2*n4^2-1448*n1*n5^2*d*n3+3072*n1*n5*d^2*n3+16*n1*n3*n5^3*d+
| 96*n2*n3^2*n4^3+2624*n1*n5^2*n2*n4-2120*d*n5^3*n4-2000*n5^2*n4^2*d-6408*n2*n5^2
| *n4*d-420*n3*n4^2*d^3-8008*d*n5^2*n2+64*d^2*n5^2*n1^2+448*n1^2*n4^2-112*n1*n4^3
| *n2*d+272*n2^2*n5^2*n4^2+224*n3^3*n2*n5+6604*n3*n5*d^2*n2+3552*n5*n3*n2^2+48*n1
| *n2^3*n4^2-5248*n5*d^3+32*n5^5+4128*n1*n4*n3*n5+2256*n1^2*n2*n5-5696*n1*n3*n4*d
| +928*n1^2*n3*n4-224*n4*n1^2*d^3+176*n3^2*n2^3-112*n1^2*n5^3*n3+324*n3^2*n5^2*d^
| 2+11132*n5*d^2*n2-422*d^5+128*n3*n5^4+132*n3^3*n5*d^2+32*n1^2*n5*n4^3-24*d*n1^2
| *n4^3-3752*n5*n3^2*d-1000*n3*n2^3*d-3568*d*n3^2*n2-16*n3*n1^4*d+144*n1^2*n2*n3^
| 2*n4+448*n3^3*n2+16*n5^2*n2^4-10848*n3*n2*n4*d+3040*n3*n2*n4^2+3488*n3*n2^2*n4-
| 1870*n2^2*d^3+848*n1*n5^2*n4^2+224*n1*n5*n4^3-280*d*n1*n4^3+3904*n1*n2*n3*n4*n5
| +4308*n5^2*n4*d^2+1296*n3^2*n4*n5^2-2056*d*n5^3*n2+1056*n3^2*n2^2+96*n1^4+1296*
| n1*n3*n5*n4*d^2-648*n2^2*n4*d^3+152*n4^3*n3*d^2-202*n2^3*d^3-3224*n4^2*d+6740*
| n4*d^2+16*n1^5*n2+304*n1*n5*n2^2*n4^2-984*n1*n5*n2*n4^2*d+76*n1*d^2*n4^3+2448*
| n2*n4^2+324*n3*n5^3*d^2+944*n1*n5*n3^2-1456*n3*d*n1^2-2464*n1*n4^2*d-704*d*n3*
| n5^3*n4-1150*n4^2*d^3-544*n3*n2^2*d^3-1050*n3^2*d^3-147*n4*d^5-3928*n5*n2*n4^2*
| d+5240*n1*d^2*n4-256*n1^3*d*n5+384*n4^3+936*n1*d^2*n3^2-1656*n1*d^3*n3-600*d*n3
| ^2*n4*n2^2+2828*n1*n2^2*d^2+107*n1^2*d^4+84*n1^3*n4*d^2+192*n4*n5^3*n3^2+1384*
| n5^3*d^2+1088*n4*n2^3-16*n5*n1^2*n3^3-8*n2^5*d-104*n3*n4^2*n1^2*d+544*n2*n3*n5^
| 3*n4+1140*n2*n5*n4^2*d^2+276*n3*n2^3*d^2-64*n1*n2*n3^3*d-1712*n1*n3^2*d-4112*d^
| 3*n4+512*n3*n4^3+192*n3*n1^3+128*n1*n5^3*n4^2+64*n1*n5^2*n4^3+928*n1*n2^2*n4*d^
| 2+144*n1^3*n2^2*n4-64*n3^4*d+192*n1^4*n2-614*n1*n3*n4*d^3+96*n1*n5*n2*n4^3+736*
| n1^3*n2+1680*n5^2*n4^2+192*n1*n3*n2^3*n4-3816*d^3+3164*n3*d^2*n5^2-192*n5*n3*n4
| ^3*d+288*n3*n5*n2^3*n4+3232*n4*n2^2+4416*n1*n4*n2*n3-4376*n5*n4^2*d-4888*d^3*n2
| -702*d^3*n1^2+96*n3^2*n1*n5^2+1496*n1*n3*n2*n4*d^2-560*n1^2*n2^2*n4*d-1528*n1*
| n4*d*n5^2*n2-578*n1*n2^2*d^3-272*d*n4*n1^3*n2+284*n1^2*n3*n4*d^2-74*n1^3*d^3+
| 237*n3*d^4*n1+3360*n2^2*n4*d^2+2464*n1*n5*n2^2*n4+168*d^2*n2*n4^3-1440*n1*n3^2*
| n4*d+1008*n1*n3^2*n4*n5+1184*n1*n3*n4^2*n5-9800*n2*d*n4+1120*n1^2*n4+1424*n1*n4
| ^2+272*n1^3-312*d*n5^3*n4^2-3696*d*n5^2*n2*n1-3072*n3*d^3*n2+896*n3*n2^3+16*n1^
| 2*n3^3*n2-88*d*n3^2*n5^3-16*n1*n5^5-232*n1^3*n3*d+2848*n3*d^2*n2^2+6680*n3*n5*
| n4*d^2+6348*n3*n2*n4*d^2-2200*n2*n1^2*n4*d+1568*n2*n1^2*n4*n5+544*n2*n3^3*n4+
| 544*n3*n2*n4^3+32*n1^4*n4+384*d^2*n4^3+192*n1*n2^4+8*n4^4*d^2-220*n1^2*d^3*n5+
| 32*n2*n3^4+32*n5*n3^2*n2^3+304*n5^4*n2-488*n1*n5^2*n4^2*d+848*n3*n2*n5^3-304*n5
| *d*n3^3*n4-88*n3^2*n2^3*d-2172*d^3*n5^2-248*n2^4*d-32*n1^3*n3*n4*n5+1072*n3^2*
| n4*n2^2-704*n3^3*n4*d+544*n3^3*n4*n5+1216*n5*n2^2*n4^2+976*n5*n2^3*n4-1552*d*n2
| ^2*n4^2-1224*d*n2^3*n4+2600*n5*n4^2*d^2+2544*n2*n4^2*d^2+400*n5*n2*n4^3+480*n3^
| 3*n5+544*n2*n4^3-4016*n3*n5*d*n2^2+160*n1^2*n2*n3*n5^2-824*n3*n5^2*d*n1*n2+563*
| n5*n4*d^4-560*d*n3*n4^3+208*n1*n2*n4^3+208*n5*n4^2*n1^2*n2-200*n5*n4^2*n1^2*d-
| 544*n1*n5*n3^2*n4*d+64*n3^4+48*n1^3*n5^2*d+80*n3^2*n2*n1^2*n5+48*n1*n5^3*n3-672
| *n1^2*n2*n3*n4*d-3210*n5*n3*d^3-160*n1*n3^2*n4^2*d+140*n1^2*n4^2*d^2+64*n2*n1^2
| *n5^3+1392*n1*n2^2*n5^2-16*n3^4*n2*d-24*d*n1^3*n4*n5+32*n2*n3^2*n5^3+96*n3*n2^3
| *n4^2-16*n1^4*n5*n3+640*n1^3*n2*n5+240*n2^3*n4^2+2288*n3^2*n4*d^2-1232*n1*n2^3*
| d-3320*n5*n3*n4^2*d+316*n1^3*n2*d^2-170*n1*d^3*n3^2+56*n1^2*d^2*n3^2-8*n1^3*n3^
| 2*d+896*n1^2*n2^2*n4+368*n1^2*n4^2*n5-504*n1^2*n4^2*d+32*n3*n4^4+1237*d^4*n4+
| 528*n5^3*n4^2+176*n5^2*n4^3+160*n3^3*n4^2+64*n3^4*n4+128*n3^2*n4^3-6512*n3*n2*
| n1*d+3136*n1*n5^2*n2-11432*n3*d*n2*n5+656*n3*n5*n2^3+480*n1*n3^2*n2^2-976*n1^3*
| n2*d-264*n5*n4*n1^2*n3*d+288*n5*n4*n1*n2^3+428*d^2*n5*n2^3-175*n2*d^5-812*d^3*
| n5*n2^2+768*n1*n2*n3^2*n5-1440*n1*n2*n3^2*d-160*n3^3*d*n1+2208*n3*n4^2+8880*n2*
| n4*d^2+864*n1^2*n3*n2^2+5728*n1*n2*n5*d^2+132*n3^3*n2*d^2-103*n1*d^5+48*n1*n5^4
| *n4+320*n3^2*n4^2*d^2+380*n1*n2^3*d^2-576*n2*n3^2*n4^2*d+2304*n3^2*n4+4000*n5^2
| *n4+2416*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-5168*n3*n5*d*n1*n2+2088*n5*d^2
| *n3^2+1280*n1^2*n4*n5-1984*n1^2*n4*d+1792*n5^3*n4+1792*n1^2*n2*n4-672*n4^3*d+
| 688*n3^2*n5*n2^2-2240*n1*n3*d*n5*n2*n4-864*n1*n5*n4*d^3-920*n1*n2*n4*d^3-508*n5
| *n4^2*d^3-1568*n2*n3*n5*n4^2*d+1376*n2^2*n4^2-80*n1*d*n3*n4^3+1136*n5^2*n3^2+
| 6432*n3*n5*n4+6112*n3*n2*n4-10488*n5*d*n4-1824*d*n2^3+224*n2*n3^3*n4*n5-2920*n3
| *n4*d^3-3810*n5*n4*d^3-3532*n2*n4*d^3+649*n2*d^4*n5-536*d*n5*n2^3*n4+32*n4^3*n5
| ^3+2768*n3^2*d^2-1456*n3^2*d*n5*n2*n4+148*n3^2*d^4-1448*n1*d*n5*n2^2*n4+160*n2*
| n1^3*n4*n5-200*n2*n1^2*d*n3^2+2036*n3^2*d^2*n2+896*n1*n2^3*n5+4204*n5*n2^2*d^2+
| 688*n5^2*n2*n3^2+816*n5^2*n2*n1^2+8320*n5*n2*n4*d^2-504*n3^3*d*n5+544*n1*n5^3+
| 992*n1*n2^3+208*n1^3*n5+112*n1*n2*n3^3+352*n5^4+16*n1^3*n3^2+4448*n1*n3*n2*n5+
| 4288*n3*n5^2*n4+1720*d^2*n1^2-840*n1*n3*d*n5^2*n4+704*n3*n2^3*n4+1536*n2*n5^2*
| n4^2+1616*n2*n5^3*n4-32*n5*n1^2*n3^2+112*n1^3*n5^2*n2+1120*n5^3*n3-2584*d*n5*n2
| *n3^2+560*n1*n2^3*n3+1536*d^2*n5*n2^2*n4+352*n3*n5*n4^3+2080*n5^2*n2^2*n4+656*
| n1*n4*n5^3+1312*n4^2+588*n5^2*n4^2*d^2+160*n1^2*n5*d^2*n3-416*n1^3*n2*d*n5+128*
| n1^3*n3*n4*n2+424*d^2*n3^3+448*n3^2*n5*n2^2*n4-280*n1*n2^2*d*n3^2-456*d*n5^3*n2
| *n3+64*n4^2*n5^4+1748*d^4-424*n1*n2*d*n5*n3^2+176*n1*n4*n3^2*n5^2-304*d*n2*n3^3
| *n4+1000*n2*n3*n4^2*d^2-360*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5^2-728*n1^2*n5*d*n3
| *n2+236*n1*n5*d^2*n3^2+160*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+64*n1*n3*n5*n4^3+
| 544*n1*n5^2*n2^2*n4-488*n3^3*n2*d-48*n1*n5^4*n3-9536*n5*n2*n1*d+304*n1^2*n5^2+
| 416*n5*n4^3+42*d^6+2848*n2*n3*n5*n4*d^2+68*d^2*n2^4+32*n2*n4^4-450*n2*d^3*n1^2-
| 224*d*n4*n5^4+96*n1^3*n2^3+256*n1*n3*n5^2*n4^2+32*n3*n2^4*n4+8480*n3*n5*n4*n2-
| 11424*n3*n5*n4*d+128*n3*n5^4*n4+1088*n1*n5^2*n2*d^2+112*n3*n5^3*n2^2+4416*n1*n5
| *n4+3296*n1*n4*n3-2920*n1*d^3-544*d*n1^3-728*n5^2*n3*n4^2*d+96*n1*n2*n3^3*n4+80
| *n2*n5*n1^4+948*n5*n3*n4^2*d^2+208*n1^2*n3*n4^2+2560*n2*n3^2*n4*n5+544*n1^2*n3*
| n4*n5+1120*n1^2*n3*n4*n2-1032*n1^2*n3*n4*d+1140*n3*n2^2*n4*d^2-384*n3^2*d^3*n2+
| 40*n1*d^2*n3^3+1562*n5*d^4+128*n5^2*n3^3*n4+1312*n1*n4*n3^2+2624*n1*n4*n2^2+
| 6592*n2*n1*d^2+68*n1^3*d^2*n3+1792*n5^3*n2-4992*n3*d*n5^2*n4+3776*n2*n3*n4*n5^2
| -2184*n1*n5*n4^2*d-2112*n1*n2*n4^2*d-3104*n1*d*n5^2*n4-1560*n1*n3*n4^2*d-1168*
| n3^2*n4^2*d+1264*n3*n5^2*n4^2-906*d^3*n5^2*n2+16*n2^5+480*n3^3+1408*n5^3+1056*
| n2^3*d^2-608*d*n2*n4^3-864*n1^2*n2^2*n5*d+447*n3*d^4*n2+1124*n3*n5*n2^2*d^2-896
| *n2*n5^2*n4^2*d+840*n5^2*n2^2*d^2-1260*d^3*n5*n2*n3-344*d*n5*n2^3*n3+600*n1^2*d
| ^2*n3*n2-3856*n3*n4^2*d+4576*n5*n2^2*n4+3344*n5*n2*n4^2+640*n5*n3*n1^2+1408*n1^
| 2*n2^2-370*d^3*n5^2*n1+640*n3^3*n4+1056*n3^2*n4^2+160*n1*n3^3+256*n1^3*n4+192*
| n1^2*n3^2-2696*n1*n3*d*n2^2+3868*n1*n3*d^2*n2+352*n1^3*d^2-1226*n3*n2*n4*d^3-
| 648*n1^2*n5*d*n3-952*n1*n5*d*n3^2+16*n1^5+320*n1^2*n4*n5^2+96*n1^3*n4*n3-296*n1
| ^3*n4*d+432*n1^3*n4*n2+388*n1^2*n5*n4*d^2-144*d*n1^2*n4*n5^2-120*n1^4*d+176*n2*
| n5^4*n4-368*n1*d*n2^3*n4-360*n1*d*n2^2*n4^2-1768*n3*d*n5*n2^2*n4-56*n3^3*n2^2*d
| -64*d*n2^4*n4+5408*n5^2*n4*n2-7240*n5^2*n4*d-24*n1^3*n4^2*d-320*d*n1^2*n2^3+
| 4352*n1*n2*n4-304*n3*d*n2*n4^3+1440*n5^2*n3*n4*d^2+1344*n1^2*n2^2*n5+96*n1*n5^3
| *n3*n2+240*n2*n5^3*n4^2+80*n2*n5^2*n4^3+672*n2^2*n3*n4*n5^2+1469*n2*d^4-384*d*
| n5^4+2736*n3*n2*n5*n4^2+1120*n3*n2^2*n4^2+1216*n3*n5^3*n4+432*n2*n1^3*n3+320*n2
| *n1^2*n3^2-1208*n3*n5^3*d+144*n1^3*n2^2*n3-384*d*n3*n4*n2^3+32*n4^4-168*d*n5^4*
| n2+240*n1^2*n5*n2^3+48*n2^2*n5^4+64*n1^2*n3*n4^2*n5+848*n1^2*d^2*n3+584*n5^3*n2
| *d^2+406*n1*n2*d^4-832*n5^2*n2^2*n1*d-688*n5^2*n2^2*d*n3+36*n1^4*d^2+1536*n1*n5
| ^2*n3*n4-4648*n1*n5*n3*n4*d-2168*n2*n3*d*n5^2*n4-588*n3*n5^2*d^3-164*n3*d^3*n1^
| 2+1876*n4*d^2*n5^2*n2+337*n1*d^4*n5+980*n5*n4*n3^2*d^2+448*n3^2*n2*n5*n4^2+624*
| n1*n2^3*n4+640*n1*n2^2*n4^2+1728*n1*n2^2*n3*n4-3448*n5*n3^2*n4*d+1696*n5*n1*n4^
| 2*n2-5336*d*n5*n2^2*n4-4008*d*n3*n4*n2^2+3136*n3*n5*n2^2*n4-3504*n3*n2*n4^2*d+
| 1160*n1^2*n4*d^2-2052*n1*d^3*n4+3252*n1*n3*n4*d^2+4508*n1*n5*n4*d^2+4660*n1*n2*
| n4*d^2-32*n4^4*d+1024*n3^2*n2*n4^2-9880*n5*n2*n3*n4*d-3384*d*n2*n3^2*n4-562*n3*
| d^3*n1*n5+424*n3*n4*d^4+160*n1^2*n3^2*n4-704*n1*n2*n3^2*n4*d+512*n1*n2*n3^2*n4*
| n5-1008*n1*d*n3*n4*n2^2+640*n5^3*n2^2+128*n1*n3^2*n4^2*n5+624*n1*n5*n4^2*d^2+
| 608*n1*n2*n4^2*d^2-744*n5^2*n3^2*n4*d-656*n1*n3*n5*n4^2*d-48*n1^3*n4*n5^2+112*
| n3^3*n2^2+1856*n1*n2^2*n5*n3-4144*n1*n2^2*n5*d+16*d^2*n3^4+24*n1^3*n3*n5*d+48*
| n5^3*n2^3+144*n1^2*n2^3*n4+48*n1*n2^4*n4-432*n4*d^3*n3^2+96*n1^2*n2^2*n4^2+544*
| n2*n4*n3^2*n5^2-752*n1*n3*n2*n4^2*d+48*n1*n5^2*n3^2*n2-16*n1*n5^2*n3^3+608*n1*
| n3*n2*n5*n4^2+1220*n3*n5^2*d^2*n2+64*n1^2*n2^4-208*n3^2*d*n1^2-1176*n3^2*d*n2^2
| -128*n1^2*n5^3+2216*n3*n4^2*d^2+1256*d^2*n5*n2^2*n1+2100*n5*n1*n4*n2*d^2-16*n4*
| n1^2*n5^3-16*n1*n5*n3^3*d-16*n1*n5^4+288*n1^2*n3*n4*n2^2+496*n1^2*n2^3+16*n1*n2
| ^5+964*n3^2*n2*n4*d^2+48*n1*n2^4*n3-80*d*n5*n2^4+240*n1^3*n2^2*n5-360*d*n5^2*n2
| *n3^2+64*n1*n3^3*n4*n5-56*n5^2*n3^3*d+672*n5^3*n2*n1+32*n2*n3^4*n4-16*n1^4*n4*d
| +48*n1^4*n4*n2-16*n1^4*n4*n5-32*n3^4*n4*d+32*n3^4*n4*n5-16*n5*n1^3*n3-120*n1^4*
| n2*d+800*n1*n4*n3*n5^2*n2-272*n2*n1^3*n3*d-1288*n5*n3*n4*d^3+288*n5^2*n2^2*n1^2
| +4688*n5^2*n2*d^2+1040*n2^3+224*n2^4+324*n3^2*n2^2*d^2-32*n3^2*n5*n1^3+459*n3*d
| ^4*n5+144*n5*n1*n3^2*n2^2+76*n1^3*d^2*n5+96*n2^2*n1^2*n3^2+96*n3*n2^4-288*n1^2*
| n5^2*d-536*n1*n5^3*d+2008*n1*n5^2*d^2+1132*n1^2*d^2*n5+64*n1^4*n2^2-16*n5^5*d+
| 176*n3^2*n5^3+120*d*n1^2*n3*n5^2+112*n3^3*n5^2+32*n5^5*n4+192*n3^2*n4^2*n5^2-64
| *n3*n5^4*d+48*n3*n5^4*n2+400*n1*n4^2*n5^2*n2-4410*n2*d^3*n5+1280*n5^2*n2^2*n3-
| 2960*n5^2*n2^2*d+2124*n2*n1^2*d^2)
""".stripMargin)
val c3 = ring(
"""
| (-44*d*n5^2*n2*n1^2-4*d^2*n2^3*n4+8
| *n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-12*d^2*n5^3*n4-4*n5
| ^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*n5-40*n1*d^3*n5+32*
| n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3*d^2*n4-16*n1*d+32*
| n1*n5-32*n1*n4+32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16*n1^2*n5*n2^2*n4+104*n1*
| n2^2*n5+24*n1*n3*n2^2+40*n5^2*n2*n1*n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*n1*n5^4*n2+32*n3*n2^4*n5+4736*n4*n2+864*n1*n3*n5*
| n2^2*n4+881*d^4*n3-72*n1*n2^4*d-752*n1*n2^2*n5*d*n3+256*n1*n3^2*d^2*n2+32*n3^2*
| n2^2*n5^2+16*n1^4*n5+1888*n3^2*n4*n5+2144*n3^2*n4*n2+96*n2^3*n4^3+504*d^2*n5^3*
| n4-48*n5^4*d*n1-2528*n3^2*n4*d-4400*n1*n5*d*n3+3392*n1*d^2*n3-4232*n1*n5^2*d+
| 6380*n1*d^2*n5+320*n1*n4^3-2470*n1*d^3*n5-2432*n5^3*d-16*n3^2*d*n1^2*n5-72*n3*
| n2^4*d+992*n2*n1^2*n3+2528*n1*n2*n4^2+864*n1*n2*n3^2-2504*n5*n2^3*d+2944*n4^2*d
| ^2-72*d*n1^3*n2^2+5576*d^2*n5^2+32*n3*n5^2*n4^3-448*n3^3*d+144*n1^3*n2^2+304*n5
| *n2^4+792*n1*n4*n5^2*d^2+96*n1*n4*n3*n5^3-8*n1^4*n5*d+5648*n3*d^2*n4-4128*n1*d+
| 3040*n1*n5+2336*n1*n4+3552*n1*n2+896*n1^2+1664*n1*n3-4128*n3*d+3040*n3*n5+2592*
| n3*n4+3296*n3*n2+896*n3^2-7136*n5*d+2624*n5^2+4128*n5*n4+6048*n5*n2-7744*n2*d+
| 448*n2^4*n4+48*n1^2*n2*n4^3-32*n1^3*n3*n4*d+64*n1^3*n5^2-2984*n3*d^3+504*n3^2*
| n5*d^2*n2+432*n1^2*n5*n2^2*n4+384*n1*n3*n2^2*n4^2+4304*n1*n2^2*n5+1984*n1*n3*n2
| ^2+96*n3*n5^3*n4^2+512*n2^2*n4^3+1184*n5^2*n2*n1*n3-3672*n5^2*n2*d*n3+944*n2^2*
| n4^2*d^2-184*n5*d^5-1312*n1^2*n2^2*d-292*n1*n4^2*d^3-8752*d*n2^2*n4-5680*d*n2*
| n4^2+164*n5*n4^3*d^2-128*n1*d*n5*n4^3+9180*n5*d^2*n4-3200*n2*n1^2*d+1808*n1*n5*
| n4^2+32*n3^3*n4^2*n5-1976*n5*n2*n4*d^3-5376*n4*d+32*n1^3*n2*n3*n5+48*n1^3*n4^2+
| 64*n1^2*n4^3+3600*n5^2*n2^2-64*d*n1*n3^2*n5^2+96*n1*n2^3*n5*n3-8*n1*n4^4*d+16*
| n3^2*n5*n4^3-96*n4^3*n5^2*d+480*n5^2*n2^3*n4-8*d*n5*n4^4-7288*n1*n5*n4*d+2432*
| n1*n5^2*n4+6912*n1*n5*n4*n2-5712*n1*n2^2*d+4624*d^2-480*n5^3*n2^2*d-16560*d*n5*
| n4*n2-1872*d*n4*n5^2*n2^2-992*d*n4*n5^3*n2-8*d*n3*n4^4-1504*n5*n2^2*n4^2*d+676*
| n1^2*n2*n4*d^2+128*n3*n1^2*n5^2+96*n3*n5^2*n2^3-692*n2*n4^2*d^3-2600*n2*n1^2*d*
| n5-296*n1*d*n5^3*n4+299*n1*d^4*n4-920*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+314*n5^2*d
| ^4+96*n1*n3*n2*n4^3+177*n4^2*d^4+728*d^2*n5*n2*n1^2+96*n1^2*n2^2*n3*n5-864*d*n3
| *n2^2*n4^2+16*n3^4*n5-72*n3^3*n2*d*n5-14616*d*n5*n2-8504*n1*n2*d+1424*n3^2*n5+
| 1424*n1^2*n5-2096*n1^2*d-368*n1^2*n2*n4^2*d+264*n1*n3^2*n4*d^2-48*n1*n3^3*n4*d+
| 1536*n3^2*n2-2096*n3^2*d+2896*n3*n2^2-7896*n3*n2*d+3280*n1*n2^2+688*n1*n3^2+
| 9476*n2*d^2+8712*n5*d^2-56*n1^2*n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+6512*
| n2^2*d^2+646*n2*n4*d^4+672*n5*n2^2*n3*n4^2+1500*n1*n4^2*d^2+144*n3*n2^2*n4^3-
| 260*d^3*n5^3+5680*n5*n2^2+5344*n5^2*n2-6288*n5^2*d-3904*n1*n3*d+2592*n1*n3*n5-
| 7304*d*n2^2+2464*n1*n5^2+6336*n1*n5*n2+688*n1^2*n3-7240*n1*n5*d+2464*n3*n5^2-
| 408*d*n5*n2*n4^3+344*n1*n3*n4^2*d^2-312*d*n2^2*n4^3+240*n5*n2^2*n4^3+16*n2*n1*
| n4^4+32*n1*n2^4*n5+352*n1*n4*n5^3*n2+1280*n1*n5^2*n3+448*n5^3*n2^2*n4+1140*n1*
| n3*n5*d^2*n2+108*d^2*n3^3*n4+3040*n2^2+368*n1*n3*n5^2*d^2+512*n2*n3*n5^2*n4^2+
| 1856*n1^2*n2+5696*n3*n5*n2-7240*n3*n5*d+4996*n3*d^2+3200*n1*n2*n3+4996*n1*d^2+
| 360*n1^2*n2^2*d^2-1408*d*n1^2*n4*n5+112*n1^3*n4*n5+624*n1^2*n4^2*n2+208*n1*n3^2
| *n4^2+96*n1*n3^3*n4+128*n1*n3*n4^3+512*n3^2*n4^2*n5+272*n5^4*n4-766*n5^2*n4*d^3
| +144*n1*n2*n3^2*n4^2-598*n1*n2*d^3*n3-192*n1*n2^3*d*n3+192*n2^2*n3^2*n4^2-776*
| n5^2*d*n3^2-1230*n1*n2*d^3*n5-512*n1*n2^3*d*n5+16*n2*n5*n4^4+608*n1*n2^2*d^2*n3
| -280*n5*n3^2*d*n4^2+2064*n3*n5*n4^2+1088*n1*n3*n4^2-2416*n5*d*n1^2+881*n1*d^4+
| 1664*n5*n3^2*n2+2240*n5*n2^3+144*n1*n2^2*n4^3+160*n5^2*n2^3*n1+16*n2*n3*n4^4-40
| *n2*n4^4*d-40*n3^3*n4^2*d+9120*n5*n2*n4-5672*n1*d*n4-4704*n1*n2^2*n4*d-568*d*n5
| *n4^3-4752*n1*n2*n3*n4*d+1312*n1*n2*n3*n4^2+944*n1*n2*n3^2*n4-6280*n3*d*n4-103*
| n3*d^5-9992*n5*n2^2*d-2952*n2*d^3*n1-44*n3^3*d^3+244*n5^3*d^2*n1-8216*n1*n2*n5*
| n4*d-9328*n1*n2*n4*d+208*n5*n2^4*n4-8*n5*n3^4*d+16*n2*n5^5-496*n1*n2*d*n5^3+656
| *n2*n1^2*n3*n5-1088*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-250*n3^2*d^3*n5+336*n1^2*
| n2*n3*n4*n5+176*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-5072*n3*n2^2*d+80*n3^3*n4*n2^2+
| 144*n3^2*n4*n2^3+7016*n3*d^2*n2+192*n1*n3*n2^2*n5^2+6380*n3*d^2*n5-168*n1^2*n3*
| n2^2*d+3264*n3*n5^2*n2-4232*n3*n5^2*d-56*n1^2*n5^3*d+32*n1*n3^3*n5+32*n1^2*n5^2
| *n4^2-1376*n1*n5^2*d*n3+2464*n1*n5*d^2*n3-96*n1*n3*n5^3*d+48*n2*n3^2*n4^3+2848*
| n1*n5^2*n2*n4-1752*d*n5^3*n4-1824*n5^2*n4^2*d-7312*n2*n5^2*n4*d-316*n3*n4^2*d^3
| -9400*d*n5^2*n2+208*d^2*n5^2*n1^2+480*n1^2*n4^2-256*n1*n4^3*n2*d+576*n2^2*n5^2*
| n4^2+144*n3^3*n2*n5+5748*n3*n5*d^2*n2+3536*n5*n3*n2^2+240*n1*n2^3*n4^2-5248*n5*
| d^3+32*n5^5+3008*n1*n4*n3*n5+2304*n1^2*n2*n5-4384*n1*n3*n4*d+736*n1^2*n3*n4-218
| *n4*n1^2*d^3+160*n3^2*n2^3+208*n3^2*n5^2*d^2+13084*n5*d^2*n2-422*d^5+96*n3*n5^4
| +76*n3^3*n5*d^2+16*n1^2*n5*n4^3-32*d*n1^2*n4^3-2416*n5*n3^2*d-1216*n3*n2^3*d-
| 2640*d*n3^2*n2+96*n1^2*n2*n3^2*n4+288*n3^3*n2+32*n5^2*n2^4-9744*n3*n2*n4*d+2656
| *n3*n2*n4^2+3936*n3*n2^2*n4-2556*n2^2*d^3+672*n1*n5^2*n4^2+240*n1*n5*n4^3-368*d
| *n1*n4^3+3360*n1*n2*n3*n4*n5+3920*n5^2*n4*d^2+768*n3^2*n4*n5^2-2360*d*n5^3*n2+
| 864*n3^2*n2^2+32*n1^4+964*n1*n3*n5*n4*d^2-1056*n2^2*n4*d^3+104*n4^3*n3*d^2-320*
| n2^3*d^3-3224*n4^2*d+6628*n4*d^2+672*n1*n5*n2^2*n4^2-1320*n1*n5*n2*n4^2*d+104*
| n1*d^2*n4^3+3104*n2*n4^2+244*n3*n5^3*d^2+624*n1*n5*n3^2-1136*n3*d*n1^2-2544*n1*
| n4^2*d-432*d*n3*n5^3*n4+16*n5*n4^4-1184*n4^2*d^3-560*n3*n2^2*d^3-692*n3^2*d^3-
| 147*n4*d^5-5272*n5*n2*n4^2*d+5112*n1*d^2*n4-288*n1^3*d*n5+384*n4^3+620*n1*d^2*
| n3^2-1296*n1*d^3*n3-592*d*n3^2*n4*n2^2+3284*n1*n2^2*d^2+98*n1^2*d^4+68*n1^3*n4*
| d^2+96*n4*n5^3*n3^2+1384*n5^3*d^2+2208*n4*n2^3-16*n2^5*d-88*n3*n4^2*n1^2*d+416*
| n2*n3*n5^3*n4+1576*n2*n5*n4^2*d^2+336*n3*n2^3*d^2-32*n1*n2*n3^3*d-1136*n1*n3^2*
| d-4048*d^3*n4+320*n3*n4^3+96*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*n4^3+1396*n1*n2
| ^2*n4*d^2+80*n1^3*n2^2*n4-32*n3^4*d+32*n1^4*n2-486*n1*n3*n4*d^3+176*n1*n5*n2*n4
| ^3+416*n1^3*n2+1552*n5^2*n4^2+288*n1*n3*n2^3*n4-3816*d^3+2396*n3*d^2*n5^2-128*
| n5*n3*n4^3*d+528*n3*n5*n2^3*n4+4800*n4*n2^2+4032*n1*n4*n2*n3-4376*n5*n4^2*d-
| 5728*d^3*n2-692*d^3*n1^2+128*n3^2*n1*n5^2+1392*n1*n3*n2*n4*d^2-592*n1^2*n2^2*n4
| *d-1664*n1*n4*d*n5^2*n2-624*n1*n2^2*d^3-176*d*n4*n1^3*n2+224*n1^2*n3*n4*d^2-44*
| n1^3*d^3+184*n3*d^4*n1+5284*n2^2*n4*d^2+3600*n1*n5*n2^2*n4+292*d^2*n2*n4^3-960*
| n1*n3^2*n4*d+624*n1*n3^2*n4*n5+832*n1*n3*n4^2*n5-11648*n2*d*n4+1120*n1^2*n4+
| 1424*n1*n4^2+272*n1^3-224*d*n5^3*n4^2+32*n2^2*n4^4-4368*d*n5^2*n2*n1-2744*n3*d^
| 3*n2+1088*n3*n2^3-56*d*n3^2*n5^3-96*n1^3*n3*d+2932*n3*d^2*n2^2+4960*n3*n5*n4*d^
| 2+5812*n3*n2*n4*d^2-2304*n2*n1^2*n4*d+1584*n2*n1^2*n4*n5+336*n2*n3^3*n4+432*n3*
| n2*n4^3+16*n1*n4^4+16*n1^4*n4+424*d^2*n4^3+144*n1*n2^4+12*n4^4*d^2-250*n1^2*d^3
| *n5+16*n2*n3^4+16*n5*n3^2*n2^3+336*n5^4*n2-368*n1*n5^2*n4^2*d+672*n3*n2*n5^3-
| 168*n5*d*n3^3*n4-80*n3^2*n2^3*d-2172*d^3*n5^2-456*n2^4*d+1008*n3^2*n4*n2^2-392*
| n3^3*n4*d+304*n3^3*n4*n5+2496*n5*n2^2*n4^2+2128*n5*n2^3*n4-3120*d*n2^2*n4^2-
| 2648*d*n2^3*n4+2612*n5*n4^2*d^2+3444*n2*n4^2*d^2+688*n5*n2*n4^3+272*n3^3*n5+800
| *n2*n4^3-4008*n3*n5*d*n2^2+96*n1^2*n2*n3*n5^2-640*n3*n5^2*d*n1*n2+545*n5*n4*d^4
| -368*d*n3*n4^3+432*n1*n2*n4^3+240*n5*n4^2*n1^2*n2-168*n5*n4^2*n1^2*d-336*n1*n5*
| n3^2*n4*d+32*n3^4-32*n1^3*n5^2*d+16*n3^2*n2*n1^2*n5+192*n1*n5^3*n3-528*n1^2*n2*
| n3*n4*d-2470*n5*n3*d^3-104*n1*n3^2*n4^2*d+152*n1^2*n4^2*d^2+96*n2*n1^2*n5^3+
| 1696*n1*n2^2*n5^2-8*n3^4*n2*d-56*d*n1^3*n4*n5+16*n2*n3^2*n5^3+240*n3*n2^3*n4^2+
| 336*n1^3*n2*n5+864*n2^3*n4^2+1464*n3^2*n4*d^2-1344*n1*n2^3*d-2392*n5*n3*n4^2*d+
| 124*n1^3*n2*d^2-112*n1*d^3*n3^2+32*n1^2*d^2*n3^2+1008*n1^2*n2^2*n4+320*n1^2*n4^
| 2*n5-544*n1^2*n4^2*d+16*n3*n4^4+1225*d^4*n4+400*n5^3*n4^2+176*n5^2*n4^3+80*n3^3
| *n4^2+32*n3^4*n4+64*n3^2*n4^3-5536*n3*n2*n1*d+3840*n1*n5^2*n2-9960*n3*d*n2*n5+
| 784*n3*n5*n2^3+272*n1*n3^2*n2^2-456*n1^3*n2*d-224*n5*n4*n1^2*n3*d+528*n5*n4*n1*
| n2^3+692*d^2*n5*n2^3-203*n2*d^5-1110*d^3*n5*n2^2+464*n1*n2*n3^2*n5-944*n1*n2*n3
| ^2*d-96*n3^3*d*n1+1552*n3*n4^2+10656*n2*n4*d^2+336*n1^2*n3*n2^2+6432*n1*n2*n5*d
| ^2+84*n3^3*n2*d^2-103*n1*d^5+32*n1*n5^4*n4+192*n3^2*n4^2*d^2+368*n1*n2^3*d^2-
| 400*n2*n3^2*n4^2*d+1440*n3^2*n4+3680*n5^2*n4+2416*n5*n4^2+432*n5*n2^3*n4^2-520*
| d*n2^3*n4^2-4096*n3*n5*d*n1*n2+1352*n5*d^2*n3^2+1248*n1^2*n4*n5-1968*n1^2*n4*d+
| 1504*n5^3*n4+1952*n1^2*n2*n4-704*n4^3*d+512*n3^2*n5*n2^2-1952*n1*n3*d*n5*n2*n4-
| 828*n1*n5*n4*d^3-1108*n1*n2*n4*d^3-514*n5*n4^2*d^3-1416*n2*n3*n5*n4^2*d+2560*n2
| ^2*n4^2-64*n1*d*n3*n4^3+720*n5^2*n3^2+4736*n3*n5*n4+5408*n3*n2*n4-10104*n5*d*n4
| -2944*d*n2^3+144*n2*n3^3*n4*n5-2236*n3*n4*d^3-3670*n5*n4*d^3-4300*n2*n4*d^3+753
| *n2*d^4*n5-1256*d*n5*n2^3*n4+16*n4^3*n5^3+1816*n3^2*d^2-1080*n3^2*d*n5*n2*n4+98
| *n3^2*d^4-2120*n1*d*n5*n2^2*n4+112*n2*n1^3*n4*n5-56*n2*n1^2*d*n3^2+1500*n3^2*d^
| 2*n2+976*n1*n2^3*n5+5796*n5*n2^2*d^2+464*n5^2*n2*n3^2+864*n5^2*n2*n1^2+9944*n5*
| n2*n4*d^2-288*n3^3*d*n5+832*n1*n5^3+1216*n1*n2^3+272*n1^3*n5+64*n1*n2*n3^3+352*
| n5^4+3648*n1*n3*n2*n5+3008*n3*n5^2*n4+1816*d^2*n1^2-576*n1*n3*d*n5^2*n4+1168*n3
| *n2^3*n4+1920*n2*n5^2*n4^2+1696*n2*n5^3*n4+32*n5*n1^2*n3^2+64*n1^3*n5^2*n2+832*
| n5^3*n3-1840*d*n5*n2*n3^2+384*n1*n2^3*n3+2488*d^2*n5*n2^2*n4+240*n3*n5*n4^3+
| 3168*n5^2*n2^2*n4+544*n1*n4*n5^3+1312*n4^2+528*n5^2*n4^2*d^2+172*n1^2*n5*d^2*n3
| -184*n1^3*n2*d*n5+64*n1^3*n3*n4*n2+244*d^2*n3^3+432*n3^2*n5*n2^2*n4-136*n1*n2^2
| *d*n3^2-360*d*n5^3*n2*n3+32*n4^2*n5^4+1748*d^4-240*n1*n2*d*n5*n3^2+96*n1*n4*n3^
| 2*n5^2-192*d*n2*n3^3*n4+940*n2*n3*n4^2*d^2-264*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5
| ^2-352*n1^2*n5*d*n3*n2+172*n1*n5*d^2*n3^2+192*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+
| 32*n1*n3*n5*n4^3+768*n1*n5^2*n2^2*n4-312*n3^3*n2*d-11112*n5*n2*n1*d+720*n1^2*n5
| ^2+480*n5*n4^3+42*d^6+2576*n2*n3*n5*n4*d^2+124*d^2*n2^4+64*n2*n4^4-344*n2*d^3*
| n1^2-152*d*n4*n5^4+128*n1*n3*n5^2*n4^2+112*n3*n2^4*n4+7424*n3*n5*n4*n2-8440*n3*
| n5*n4*d+64*n3*n5^4*n4+1232*n1*n5^2*n2*d^2+96*n3*n5^3*n2^2+4096*n1*n5*n4+2496*n1
| *n4*n3-2984*n1*d^3-448*d*n1^3-464*n5^2*n3*n4^2*d+64*n1*n2*n3^3*n4+16*n2*n5*n1^4
| +684*n5*n3*n4^2*d^2+176*n1^2*n3*n4^2+1872*n2*n3^2*n4*n5+432*n1^2*n3*n4*n5+912*
| n1^2*n3*n4*n2-816*n1^2*n3*n4*d+1396*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+24*n1*d^2*n3
| ^3+1562*n5*d^4+64*n5^2*n3^3*n4+864*n1*n4*n3^2+3936*n1*n4*n2^2+7552*n2*n1*d^2+24
| *n1^3*d^2*n3+2080*n5^3*n2-3488*n3*d*n5^2*n4+3168*n2*n3*n4*n5^2-2088*n1*n5*n4^2*
| d-3040*n1*n2*n4^2*d-2792*n1*d*n5^2*n4-1232*n1*n3*n4^2*d-688*n3^2*n4^2*d+832*n3*
| n5^2*n4^2-1046*d^3*n5^2*n2+32*n2^5+272*n3^3+1408*n5^3+1688*n2^3*d^2-968*d*n2*n4
| ^3-536*n1^2*n2^2*n5*d+399*n3*d^4*n2+1124*n3*n5*n2^2*d^2-1136*n2*n5^2*n4^2*d+
| 1152*n5^2*n2^2*d^2-1096*d^3*n5*n2*n3-416*d*n5*n2^3*n3+296*n1^2*d^2*n3*n2-2768*
| n3*n4^2*d+6976*n5*n2^2*n4+4384*n5*n2*n4^2+624*n5*n3*n1^2+1184*n1^2*n2^2-448*d^3
| *n5^2*n1+352*n3^3*n4+608*n3^2*n4^2+96*n1*n3^3+224*n1^3*n4+128*n1^2*n3^2-2208*n1
| *n3*d*n2^2+3164*n1*n3*d^2*n2+244*n1^3*d^2-1148*n3*n2*n4*d^3-656*n1^2*n5*d*n3-
| 656*n1*n5*d*n3^2+368*n1^2*n4*n5^2+64*n1^3*n4*n3-248*n1^3*n4*d+304*n1^3*n4*n2+
| 392*n1^2*n5*n4*d^2-192*d*n1^2*n4*n5^2-32*n1^4*d+160*n2*n5^4*n4-688*n1*d*n2^3*n4
| -864*n1*d*n2^2*n4^2-2120*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-264*d*n2^4*n4+6144*n5^2
| *n4*n2-6616*n5^2*n4*d-24*n1^3*n4^2*d-112*d*n1^2*n2^3+5152*n1*n2*n4-256*n3*d*n2*
| n4^3+1000*n5^2*n3*n4*d^2+992*n1^2*n2^2*n5+96*n1*n5^3*n3*n2+256*n2*n5^3*n4^2+128
| *n2*n5^2*n4^3+768*n2^2*n3*n4*n5^2+1713*n2*d^4-384*d*n5^4+2416*n3*n2*n5*n4^2+
| 1440*n3*n2^2*n4^2+768*n3*n5^3*n4+96*n2*n1^3*n3+112*n2*n1^2*n3^2-904*n3*n5^3*d-
| 688*d*n3*n4*n2^3+32*n4^4-184*d*n5^4*n2+80*n1^2*n5*n2^3+64*n2^2*n5^4+32*n1^2*n3*
| n4^2*n5+620*n1^2*d^2*n3+664*n5^3*n2*d^2+429*n1*n2*d^4-928*n5^2*n2^2*n1*d-656*n5
| ^2*n2^2*d*n3+8*n1^4*d^2+1056*n1*n5^2*n3*n4-3424*n1*n5*n3*n4*d-1840*n2*n3*d*n5^2
| *n4-448*n3*n5^2*d^3-112*n3*d^3*n1^2+2160*n4*d^2*n5^2*n2+355*n1*d^4*n5+616*n5*n4
| *n3^2*d^2+304*n3^2*n2*n5*n4^2+1168*n1*n2^3*n4+1440*n1*n2^2*n4^2+2016*n1*n2^2*n3
| *n4-2168*n5*n3^2*n4*d+2224*n5*n1*n4^2*n2-8360*d*n5*n2^2*n4-4704*d*n3*n4*n2^2+
| 3600*n3*n5*n2^2*n4-3168*n3*n2*n4^2*d+1140*n1^2*n4*d^2-2028*n1*d^3*n4+2540*n1*n3
| *n4*d^2+4276*n1*n5*n4*d^2+5588*n1*n2*n4*d^2-40*n4^4*d+688*n3^2*n2*n4^2-8776*n5*
| n2*n3*n4*d-2512*d*n2*n3^2*n4-456*n3*d^3*n1*n5+329*n3*n4*d^4+112*n1^2*n3^2*n4-
| 544*n1*n2*n3^2*n4*d+368*n1*n2*n3^2*n4*n5-1184*n1*d*n3*n4*n2^2+880*n5^3*n2^2+64*
| n1*n3^2*n4^2*n5+596*n1*n5*n4^2*d^2+908*n1*n2*n4^2*d^2-432*n5^2*n3^2*n4*d+32*n1^
| 2*n5^2*n3*n4-448*n1*n3*n5*n4^2*d+80*n3^3*n2^2+32*n4*n2^5+1408*n1*n2^2*n5*n3-
| 4872*n1*n2^2*n5*d+8*d^2*n3^4-16*n1^3*n3*n5*d+80*n5^3*n2^3+144*n1^2*n2^3*n4+112*
| n1*n2^4*n4-280*n4*d^3*n3^2+192*n1^2*n2^2*n4^2+384*n2*n4*n3^2*n5^2-768*n1*n3*n2*
| n4^2*d+32*n1*n5^2*n3^2*n2+544*n1*n3*n2*n5*n4^2+96*n2^4*n4^2+1024*n3*n5^2*d^2*n2
| -128*n3^2*d*n1^2-960*n3^2*d*n2^2+112*n1^2*n5^3+1628*n3*n4^2*d^2+1364*d^2*n5*n2^
| 2*n1+2424*n5*n1*n4*n2*d^2+16*n4*n1^2*n5^3-16*n1*n5*n3^3*d+96*n1*n5^4+240*n1^2*
| n3*n4*n2^2+224*n1^2*n2^3+732*n3^2*n2*n4*d^2-152*d*n5*n2^4+64*n1^3*n2^2*n5-240*d
| *n5^2*n2*n3^2+32*n1*n3^3*n4*n5-32*n5^2*n3^3*d+896*n5^3*n2*n1+16*n2*n3^4*n4-8*n1
| ^4*n4*d+16*n1^4*n4*n2-16*n3^4*n4*d+16*n3^4*n4*n5+32*n5*n1^3*n3-16*n1^4*n2*d+640
| *n1*n4*n3*n5^2*n2-48*n2*n1^3*n3*d-962*n5*n3*n4*d^3+192*n5^2*n2^2*n1^2+5456*n5^2
| *n2*d^2+1696*n2^3+416*n2^4+264*n3^2*n2^2*d^2+355*n3*d^4*n5+32*n5*n1*n3^2*n2^2+
| 76*n1^3*d^2*n5+144*n3*n2^4-776*n1^2*n5^2*d-904*n1*n5^3*d+2396*n1*n5^2*d^2+1352*
| n1^2*d^2*n5-16*n5^5*d+112*n3^2*n5^3-64*d*n1^2*n3*n5^2+64*n3^3*n5^2+16*n5^5*n4+
| 96*n3^2*n4^2*n5^2-48*n3*n5^4*d+32*n3*n5^4*n2+448*n1*n4^2*n5^2*n2-5150*n2*d^3*n5
| +1216*n5^2*n2^2*n3-4096*n5^2*n2^2*d+1824*n2*n1^2*d^2)
""".stripMargin)
val c5 = ring(
"""
| (-44*d*n5^2*n2*n1^2-4*d^2
| *n2^3*n4+8*n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-12*d^2*n5
| ^3*n4-4*n5^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*n5-40*n1*d
| ^3*n5+32*n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3*d^2*n4-16
| *n1*d+32*n1*n5-32*n1*n4+32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16*n1^2*n5*n2^2*
| n4+104*n1*n2^2*n5+24*n1*n3*n2^2+40*n5^2*n2*n1*n3-8*n2^2*n4^2*d^2-32*n1^2*n2^2*d
| +3*n1*n4^2*d^3+80*d*n2^2*n4+36*d*n2*n4^2-96*n5*d^2*n4-104*n2*n1^2*d-32*n1*n5*n4
| ^2+25*n5*n2*n4*d^3+16*n4*d+8*n1^3*n2*n3*n5+8*n1*n2^3*n5*n3-8*n5^2*n2^3*n4+96*n1
| *n5*n4*d-40*n1*n5^2*n4-80*n1*n5*n4*n2-80*n1*n2^2*d+212*d*n5*n4*n2+40*d*n4*n5^2*
| n2^2+32*d*n4*n5^3*n2+24*n5*n2^2*n4^2*d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*n2^2*n3*n4-48*n5*n1*n4^2*n2+116*d*n5*n2^2*n4+28*d*n3
| *n4*n2^2-40*n3*n5*n2^2*n4+4*n1^2*n4*d^2+16*n1*d^3*n4-16*n1*n3*n4*d^2-48*n1*n5*
| n4*d^2-32*n1*n2*n4*d^2+64*n5*n2*n3*n4*d-5*n3*d^3*n1*n5-n3*n4*d^4+8*n1*d*n3*n4*
| n2^2-10*n1*n5*n4^2*d^2-10*n1*n2*n4^2*d^2+40*n1*n2^2*n5*n3-116*n1*n2^2*n5*d-4*n1
| ^3*n3*n5*d+16*n1^2*n5^3+32*d^2*n5*n2^2*n1-18*n5*n1*n4*n2*d^2+8*n1*n5^4+56*n5^3*
| n2*n1+8*n5*n1^3*n3-16*n1*n4*n3*n5^2*n2-4*n2*n1^3*n3*d+5*n5*n3*n4*d^3+16*n5^2*n2
| ^2*n1^2+6*n1^3*d^2*n5-68*n1^2*n5^2*d-44*n1*n5^3*d+68*n1*n5^2*d^2+72*n1^2*d^2*n5
| -8*d*n1^2*n3*n5^2-16*n1*n4^2*n5^2*n2+56*n2*n1^2*d^2)
""".stripMargin)
val c6 = ring(
"""
| (384+96*n1^4*n2*n3-42*d^3*n4^3+1248*n1+1632*n2+864*n3+864*n4+1728*n5-1760*d-520*
| d*n5^2*n2^3+373*n2^2*d^4-2224*d*n5^2*n2*n1^2+392*d^2*n2^3*n4+96*n1^3*n2*n3^2+
| 976*n5^2*n2^3+96*n1^3*n2*n4^2+256*n1*n5^4*n2+32*n3*n2^4*n5+2720*n4*n2+864*n1*n3
| *n5*n2^2*n4+831*d^4*n3+48*n1*n5^3*n3^2-264*n1*n2^4*d+96*n1*n3^2*n2^3-2096*n1*n2
| ^2*n5*d*n3+520*n1*n3^2*d^2*n2+32*n3^2*n2^2*n5^2+256*n1^4*n5+1600*n3^2*n4*n5+
| 1568*n3^2*n4*n2-16*n1^5*d+508*d^2*n5^3*n4+288*n1^2*n2^3*n3-216*n5^4*d*n1-2048*
| n3^2*n4*d-7832*n1*n5*d*n3+4692*n1*d^2*n3-8872*n1*n5^2*d+10716*n1*d^2*n5+176*n1*
| n4^3-4498*n1*d^3*n5-3520*n5^3*d-256*n3^2*d*n1^2*n5-72*n3*n2^4*d+3072*n2*n1^2*n3
| +1632*n1*n2*n4^2+1344*n1*n2*n3^2-2640*n5*n2^3*d+1708*n4^2*d^2+48*n1^2*n5^4-712*
| d*n1^3*n2^2+6760*d^2*n5^2+32*n3*n5^2*n4^3-416*n3^3*d+1136*n1^3*n2^2+320*n5*n2^4
| +1116*n1*n4*n5^2*d^2+128*n1*n4*n3*n5^3-128*n1^4*n5*d+4160*n3*d^2*n4-4456*n1*d+
| 4192*n1*n5+1952*n1*n4+4064*n1*n2+1680*n1^2+1792*n1*n3-3016*n3*d+2720*n3*n5+1728
| *n3*n4+2560*n3*n2+688*n3^2-6064*n5*d+2752*n5^2+2848*n5*n4+5280*n5*n2-5704*n2*d+
| 160*n2^4*n4+32*n1^2*n2*n4^3-120*n1^3*n3*n4*d+688*n1^3*n5^2-2626*n3*d^3+560*n3^2
| *n5*d^2*n2+928*n1^2*n5*n2^2*n4+192*n1*n3*n2^2*n4^2+7632*n1*n2^2*n5+3328*n1*n3*
| n2^2+96*n3*n5^3*n4^2+128*n2^2*n4^3+3232*n5^2*n2*n1*n3-4488*n5^2*n2*d*n3+372*n2^
| 2*n4^2*d^2+48*n1^3*n5^3-212*n5*d^5-4352*n1^2*n2^2*d-224*n1*n4^2*d^3-5416*d*n2^2
| *n4-2896*d*n2*n4^2+88*n5*n4^3*d^2-88*n1*d*n5*n4^3+7204*n5*d^2*n4-7992*n2*n1^2*d
| +1552*n1*n5*n4^2+32*n3^3*n4^2*n5-1502*n5*n2*n4*d^3-3080*n4*d+464*n1^3*n2*n3*n5+
| 96*n1^3*n4^2+48*n1^2*n4^3+4144*n5^2*n2^2-272*d*n1*n3^2*n5^2+16*n1^4*n5^2+496*n1
| *n2^3*n5*n3+16*n3^2*n5*n4^3+112*n1^4*n3-64*n4^3*n5^2*d+224*n5^2*n2^3*n4-8432*n1
| *n5*n4*d+3280*n1*n5^2*n4+7632*n1*n5*n4*n2-8632*n1*n2^2*d+3200*d^2-656*n5^3*n2^2
| *d-12048*d*n5*n4*n2-1280*d*n4*n5^2*n2^2-904*d*n4*n5^3*n2-8*d*n3*n4^4-616*n5*n2^
| 2*n4^2*d+1236*n1^2*n2*n4*d^2+1136*n3*n1^2*n5^2+112*n3*n5^2*n2^3+80*n3^2*n5^2*n1
| ^2+32*n1*n2^2*n3^3+80*n1^3*n5^2*n3-356*n2*n4^2*d^3-8872*n2*n1^2*d*n5-456*n1*d*
| n5^3*n4+325*n1*d^4*n4-2016*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+418*n5^2*d^4+48*n1*n3
| *n2*n4^3+108*n4^2*d^4+2756*d^2*n5*n2*n1^2+912*n1^2*n2^2*n3*n5-360*d*n3*n2^2*n4^
| 2+16*n3^4*n5-80*n3^3*n2*d*n5-13848*d*n5*n2-10848*n1*n2*d+1424*n3^2*n5+3984*n1^2
| *n5-4488*n1^2*d-408*n1^2*n2*n4^2*d+244*n1*n3^2*n4*d^2-40*n1*n3^3*n4*d+1344*n3^2
| *n2-1760*n3^2*d+2512*n3*n2^2-6632*n3*n2*d+4480*n1*n2^2+832*n1*n3^2+7692*n2*d^2+
| 8184*n5*d^2-88*n1^2*n3^2*n4*d+32*n1^2*n3^2*n4*n5+184*d^2*n5^4+5880*n2^2*d^2+451
| *n2*n4*d^4+272*n5*n2^2*n3*n4^2+1132*n1*n4^2*d^2+48*n3*n2^2*n4^3-400*d^3*n5^3+
| 5456*n5*n2^2+5952*n5^2*n2-7152*n5^2*d-4808*n1*n3*d+4160*n1*n3*n5-6184*d*n2^2+
| 4768*n1*n5^2+9792*n1*n5*n2+1712*n1^2*n3-11096*n1*n5*d+2848*n3*n5^2-160*d*n5*n2*
| n4^3+256*n1*n3*n4^2*d^2-64*d*n2^2*n4^3+48*n5*n2^2*n4^3+208*n1*n2^4*n5+560*n1*n4
| *n5^3*n2+3024*n1*n5^2*n3+320*n5^3*n2^2*n4+2604*n1*n3*n5*d^2*n2+96*d^2*n3^3*n4+
| 2384*n2^2+1036*n1*n3*n5^2*d^2+336*n2*n3*n5^2*n4^2+4096*n1^2*n2+5568*n3*n5*n2-
| 7016*n3*n5*d+4044*n3*d^2+4224*n1*n2*n3+6108*n1*d^2+1376*n1^2*n2^2*d^2-2992*d*n1
| ^2*n4*n5+544*n1^3*n4*n5+656*n1^2*n4^2*n2+160*n1*n3^2*n4^2+80*n1*n3^3*n4+80*n1*
| n3*n4^3+432*n3^2*n4^2*n5+288*n5^4*n4-710*n5^2*n4*d^3+96*n1*n2*n3^2*n4^2-1084*n1
| *n2*d^3*n3-624*n1*n2^3*d*n3+96*n2^2*n3^2*n4^2-968*n5^2*d*n3^2-2456*n1*n2*d^3*n5
| -1376*n1*n2^3*d*n5+1304*n1*n2^2*d^2*n3-240*n5*n3^2*d*n4^2+1536*n3*n5*n4^2+800*
| n1*n3*n4^2-7520*n5*d*n1^2+1315*n1*d^4+1760*n5*n3^2*n2+2288*n5*n2^3+32*n1*n2^2*
| n4^3+544*n5^2*n2^3*n1+16*n2*n3*n4^4-8*n2*n4^4*d-40*n3^3*n4^2*d+6368*n5*n2*n4-
| 5168*n1*d*n4-4504*n1*n2^2*n4*d-304*d*n5*n4^3-4400*n1*n2*n3*n4*d+832*n1*n2*n3*n4
| ^2+784*n1*n2*n3^2*n4-4440*n3*d*n4-103*n3*d^5-10144*n5*n2^2*d-4560*n2*d^3*n1-44*
| n3^3*d^3+748*n5^3*d^2*n1-9480*n1*n2*n5*n4*d-8832*n1*n2*n4*d+48*n5*n2^4*n4-8*n5*
| n3^4*d+32*n2*n5^5-1488*n1*n2*d*n5^3+3232*n2*n1^2*n3*n5-3904*n2*n1^2*n3*d+144*n1
| ^2*n2*n3*n4^2-282*n3^2*d^3*n5+704*n1^2*n2*n3*n4*n5+112*n2*n3*n5*n4^3+48*n2*n3^3
| *n4^2-4648*n3*n2^2*d+48*n3^3*n4*n2^2+48*n3^2*n4*n2^3+6300*n3*d^2*n2+784*n1*n3*
| n2^2*n5^2+6596*n3*d^2*n5-1088*n1^2*n3*n2^2*d+3856*n3*n5^2*n2-5128*n3*n5^2*d-432
| *n1^2*n5^3*d+96*n1*n3^3*n5+32*n1^2*n5^2*n4^2-3568*n1*n5^2*d*n3+4812*n1*n5*d^2*
| n3-424*n1*n3*n5^3*d+48*n2*n3^2*n4^3+3808*n1*n5^2*n2*n4-1768*d*n5^3*n4-1360*n5^2
| *n4^2*d-6048*n2*n5^2*n4*d-222*n3*n4^2*d^3-11072*d*n5^2*n2+1028*d^2*n5^2*n1^2+
| 512*n1^2*n4^2-104*n1*n4^3*n2*d+256*n2^2*n5^2*n4^2+160*n3^3*n2*n5+6200*n3*n5*d^2
| *n2+3648*n5*n3*n2^2+96*n1*n2^3*n4^2-5348*n5*d^3+64*n5^5+3216*n1*n4*n3*n5+7056*
| n1^2*n2*n5-4048*n1*n3*n4*d+1136*n1^2*n3*n4-400*n4*n1^2*d^3+160*n3^2*n2^3+112*n1
| ^2*n5^3*n3+264*n3^2*n5^2*d^2+13276*n5*d^2*n2-394*d^5+160*n3*n5^4+84*n3^3*n5*d^2
| +16*n1^2*n5*n4^3-24*d*n1^2*n4^3-2536*n5*n3^2*d-1184*n3*n2^3*d-2432*d*n3^2*n2-56
| *n3*n1^4*d+144*n1^2*n2*n3^2*n4+272*n3^3*n2+32*n5^2*n2^4-6624*n3*n2*n4*d+1616*n3
| *n2*n4^2+2416*n3*n2^2*n4-2438*n2^2*d^3+640*n1*n5^2*n4^2+160*n1*n5*n4^3-200*d*n1
| *n4^3+3536*n1*n2*n3*n4*n5+3588*n5^2*n4*d^2+672*n3^2*n4*n5^2-3368*d*n5^3*n2+816*
| n3^2*n2^2+336*n1^4+1092*n1*n3*n5*n4*d^2-654*n2^2*n4*d^3+76*n4^3*n3*d^2-320*n2^3
| *d^3-1768*n4^2*d+4204*n4*d^2+32*n1^5*n2+416*n1*n5*n2^2*n4^2-1032*n1*n5*n2*n4^2*
| d+56*n1*d^2*n4^3+1536*n2*n4^2+360*n3*n5^3*d^2+1216*n1*n5*n3^2-3272*n3*d*n1^2-
| 1880*n1*n4^2*d-400*d*n3*n5^3*n4-710*n4^2*d^3-560*n3*n2^2*d^3-660*n3^2*d^3-111*
| n4*d^5-2936*n5*n2*n4^2*d+4996*n1*d^2*n4-2000*n1^3*d*n5+192*n4^3+972*n1*d^2*n3^2
| -1986*n1*d^3*n3-336*d*n3^2*n4*n2^2+5476*n1*n2^2*d^2+289*n1^2*d^4+240*n1^3*n4*d^
| 2+96*n4*n5^3*n3^2+2072*n5^3*d^2+1216*n4*n2^3+16*n5*n1^2*n3^3-16*n2^5*d-88*n3*n4
| ^2*n1^2*d+320*n2*n3*n5^3*n4+876*n2*n5*n4^2*d^2+336*n3*n2^3*d^2-80*n1*n2*n3^3*d-
| 1576*n1*n3^2*d-2770*d^3*n4+256*n3*n4^3+768*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*
| n4^3+1388*n1*n2^2*n4*d^2+288*n1^3*n2^2*n4-32*n3^4*d+432*n1^4*n2-490*n1*n3*n4*d^
| 3+96*n1*n5*n2*n4^3+2000*n1^3*n2+1152*n5^2*n4^2+240*n1*n3*n2^3*n4-2976*d^3+3016*
| n3*d^2*n5^2-96*n5*n3*n4^3*d+192*n3*n5*n2^3*n4+2912*n4*n2^2+3552*n1*n4*n2*n3-
| 2848*n5*n4^2*d-5042*d^3*n2-1854*d^3*n1^2+480*n3^2*n1*n5^2+1348*n1*n3*n2*n4*d^2-
| 1096*n1^2*n2^2*n4*d-2288*n1*n4*d*n5^2*n2-1144*n1*n2^2*d^3-592*d*n4*n1^3*n2+388*
| n1^2*n3*n4*d^2-256*n1^3*d^3+309*n3*d^4*n1+3288*n2^2*n4*d^2+3872*n1*n5*n2^2*n4+
| 108*d^2*n2*n4^3-864*n1*n3^2*n4*d+624*n1*n3^2*n4*n5+688*n1*n3*n4^2*n5-7216*n2*d*
| n4+1664*n1^2*n4+1024*n1*n4^2+1120*n1^3-192*d*n5^3*n4^2-9744*d*n5^2*n2*n1-2610*
| n3*d^3*n2+1024*n3*n2^3+32*n1^2*n3^3*n2-80*d*n3^2*n5^3+16*n1*n5^5-896*n1^3*n3*d+
| 2816*n3*d^2*n2^2+4060*n3*n5*n4*d^2+4008*n3*n2*n4*d^2-3944*n2*n1^2*n4*d+3280*n2*
| n1^2*n4*n5+272*n2*n3^3*n4+272*n3*n2*n4^3+112*n1^4*n4+216*d^2*n4^3+432*n1*n2^4+4
| *n4^4*d^2-932*n1^2*d^3*n5+16*n2*n3^4+16*n5*n3^2*n2^3+560*n5^4*n2-352*n1*n5^2*n4
| ^2*d+928*n3*n2*n5^3-152*n5*d*n3^3*n4-80*n3^2*n2^3*d-2772*d^3*n5^2-448*n2^4*d+32
| *n1^3*n3*n4*n5+608*n3^2*n4*n2^2-352*n3^3*n4*d+272*n3^3*n4*n5+1088*n5*n2^2*n4^2+
| 1136*n5*n2^3*n4-1304*d*n2^2*n4^2-1392*d*n2^3*n4+1732*n5*n4^2*d^2+1776*n2*n4^2*d
| ^2+272*n5*n2*n4^3+288*n3^3*n5+320*n2*n4^3-4288*n3*n5*d*n2^2+752*n1^2*n2*n3*n5^2
| -1936*n3*n5^2*d*n1*n2+457*n5*n4*d^4-280*d*n3*n4^3+176*n1*n2*n4^3+320*n5*n4^2*n1
| ^2*n2-208*n5*n4^2*n1^2*d-344*n1*n5*n3^2*n4*d+32*n3^4-360*n1^3*n5^2*d+304*n3^2*
| n2*n1^2*n5+768*n1*n5^3*n3-912*n1^2*n2*n3*n4*d-2694*n5*n3*d^3-80*n1*n3^2*n4^2*d+
| 172*n1^2*n4^2*d^2+560*n2*n1^2*n5^3+3936*n1*n2^2*n5^2-8*n3^4*n2*d-288*d*n1^3*n4*
| n5+16*n2*n3^2*n5^3+48*n3*n2^3*n4^2+16*n1^4*n5*n3+2144*n1^3*n2*n5+240*n2^3*n4^2+
| 1192*n3^2*n4*d^2-2656*n1*n2^3*d-1768*n5*n3*n4^2*d+788*n1^3*n2*d^2-196*n1*d^3*n3
| ^2+184*n1^2*d^2*n3^2-64*n1^3*n3^2*d+1744*n1^2*n2^2*n4+400*n1^2*n4^2*n5-600*n1^2
| *n4^2*d+16*n3*n4^4+887*d^4*n4+336*n5^3*n4^2+112*n5^2*n4^3+80*n3^3*n4^2+32*n3^4*
| n4+64*n3^2*n4^3-8176*n3*n2*n1*d+7904*n1*n5^2*n2-10264*n3*d*n2*n5+832*n3*n5*n2^3
| +672*n1*n3^2*n2^2-2528*n1^3*n2*d-480*n5*n4*n1^2*n3*d+528*n5*n4*n1*n2^3+748*d^2*
| n5*n2^3-203*n2*d^5-1228*d^3*n5*n2^2+1248*n1*n2*n3^2*n5-1680*n1*n2*n3^2*d-152*n3
| ^3*d*n1+1104*n3*n4^2+6972*n2*n4*d^2+1728*n1^2*n3*n2^2+11852*n1*n2*n5*d^2+84*n3^
| 3*n2*d^2-167*n1*d^5+48*n1*n5^4*n4+160*n3^2*n4^2*d^2+820*n1*n2^3*d^2-288*n2*n3^2
| *n4^2*d+1152*n3^2*n4+3200*n5^2*n4+1520*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-
| 8488*n3*n5*d*n1*n2+1476*n5*d^2*n3^2+2512*n1^2*n4*n5-3176*n1^2*n4*d+1520*n5^3*n4
| +3104*n1^2*n2*n4-360*n4^3*d+560*n3^2*n5*n2^2-2128*n1*n3*d*n5*n2*n4-1032*n1*n5*
| n4*d^3-1162*n1*n2*n4*d^3-344*n5*n4^2*d^3-856*n2*n3*n5*n4^2*d+1120*n2^2*n4^2-40*
| n1*d*n3*n4^3+880*n5^2*n3^2+3744*n3*n5*n4+3584*n3*n2*n4-7512*n5*d*n4-2736*d*n2^3
| +112*n2*n3^3*n4*n5-1694*n3*n4*d^3-2994*n5*n4*d^3-2924*n2*n4*d^3+851*n2*d^4*n5-
| 616*d*n5*n2^3*n4+16*n4^3*n5^3+1636*n3^2*d^2-776*n3^2*d*n5*n2*n4+98*n3^2*d^4-
| 2344*n1*d*n5*n2^2*n4+464*n2*n1^3*n4*n5-400*n2*n1^2*d*n3^2+1444*n3^2*d^2*n2+2272
| *n1*n2^3*n5+6164*n5*n2^2*d^2+560*n5^2*n2*n3^2+3648*n5^2*n2*n1^2+7436*n5*n2*n4*d
| ^2-312*n3^3*d*n5+2240*n1*n5^3+2128*n1*n2^3+1712*n1^3*n5+128*n1*n2*n3^3+608*n5^4
| +128*n1^3*n3^2+6832*n1*n3*n2*n5+2624*n3*n5^2*n4+4376*d^2*n1^2-720*n1*n3*d*n5^2*
| n4+544*n3*n2^3*n4+1200*n2*n5^2*n4^2+1552*n2*n5^3*n4+464*n5*n1^2*n3^2+512*n1^3*
| n5^2*n2+1184*n5^3*n3-2000*d*n5*n2*n3^2+1024*n1*n2^3*n3+1620*d^2*n5*n2^2*n4+176*
| n3*n5*n4^3+2240*n5^2*n2^2*n4+832*n1*n4*n5^3+656*n4^2+396*n5^2*n4^2*d^2+932*n1^2
| *n5*d^2*n3-1312*n1^3*n2*d*n5+208*n1^3*n3*n4*n2+236*d^2*n3^3+224*n3^2*n5*n2^2*n4
| -416*n1*n2^2*d*n3^2-504*d*n5^3*n2*n3+32*n4^2*n5^4+1504*d^4-752*n1*n2*d*n5*n3^2+
| 112*n1*n4*n3^2*n5^2-152*d*n2*n3^3*n4+548*n2*n3*n4^2*d^2-288*n3^2*n5*d*n2^2+768*
| n2*n1^2*n4*n5^2-1984*n1^2*n5*d*n3*n2+424*n1*n5*d^2*n3^2+608*n1*n5^3*n2^2+192*n1
| *n3^2*n4*n2^2+32*n1*n3*n5*n4^3+944*n1*n5^2*n2^2*n4-304*n3^3*n2*d+48*n1*n5^4*n3-
| 18808*n5*n2*n1*d+3008*n1^2*n5^2+256*n5*n4^3+42*d^6+1868*n2*n3*n5*n4*d^2+124*d^2
| *n2^4+16*n2*n4^4-1080*n2*d^3*n1^2-160*d*n4*n5^4+192*n1^3*n2^3+128*n1*n3*n5^2*n4
| ^2+16*n3*n2^4*n4+5392*n3*n5*n4*n2-6816*n3*n5*n4*d+48*n1*n2*n3^3*n5+64*n3*n5^4*
| n4+2968*n1*n5^2*n2*d^2+128*n3*n5^3*n2^2+4512*n1*n5*n4+2176*n1*n4*n3-4058*n1*d^3
| -2096*d*n1^3-376*n5^2*n3*n4^2*d+48*n1*n2*n3^3*n4+208*n2*n5*n1^4+504*n5*n3*n4^2*
| d^2+176*n1^2*n3*n4^2+1376*n2*n3^2*n4*n5+896*n1^2*n3*n4*n5+1472*n1^2*n3*n4*n2-
| 1344*n1^2*n3*n4*d+816*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+44*n1*d^2*n3^3+1702*n5*d^4
| +64*n5^2*n3^3*n4+752*n1*n4*n3^2+3616*n1*n4*n2^2+10640*n2*n1*d^2+256*n1^3*d^2*n3
| +2864*n5^3*n2-3048*n3*d*n5^2*n4+2416*n2*n3*n4*n5^2-1800*n1*n5*n4^2*d-2016*n1*n2
| *n4^2*d-3856*n1*d*n5^2*n4-912*n1*n3*n4^2*d-584*n3^2*n4^2*d+656*n3*n5^2*n4^2-
| 1344*d^3*n5^2*n2+32*n2^5+240*n3^3+1952*n5^3+1632*n2^3*d^2-376*d*n2*n4^3-2400*n1
| ^2*n2^2*n5*d+399*n3*d^4*n2+1240*n3*n5*n2^2*d^2-712*n2*n5^2*n4^2*d+1416*n5^2*n2^
| 2*d^2+48*n3^3*n1^2-1230*d^3*n5*n2*n3-448*d*n5*n2^3*n3+1224*n1^2*d^2*n3*n2-1976*
| n3*n4^2*d+4640*n5*n2^2*n4+2416*n5*n2*n4^2+2672*n5*n3*n1^2+3392*n1^2*n2^2-1076*d
| ^3*n5^2*n1+320*n3^3*n4+528*n3^2*n4^2+128*n1*n3^3+704*n1^3*n4+528*n1^2*n3^2-4192
| *n1*n3*d*n2^2+5192*n1*n3*d^2*n2+1280*n1^3*d^2-796*n3*n2*n4*d^3-3192*n1^2*n5*d*
| n3-1448*n1*n5*d*n3^2+32*n1^5+976*n1^2*n4*n5^2+240*n1^3*n4*n3-832*n1^3*n4*d+960*
| n1^3*n4*n2+872*n1^2*n5*n4*d^2-528*d*n1^2*n4*n5^2-384*n1^4*d+160*n2*n5^4*n4-640*
| n1*d*n2^3*n4-480*n1*d*n2^2*n4^2-1232*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-80*d*n2^4*
| n4+5008*n5^2*n4*n2-5936*n5^2*n4*d-48*n1^3*n4^2*d-712*d*n1^2*n2^3+4576*n1*n2*n4-
| 152*n3*d*n2*n4^3+876*n5^2*n3*n4*d^2+3840*n1^2*n2^2*n5+432*n1*n5^3*n3*n2+192*n2*
| n5^3*n4^2+64*n2*n5^2*n4^3+432*n2^2*n3*n4*n5^2+1615*n2*d^4-672*d*n5^4-24*n1^2*n3
| ^3*d+1488*n3*n2*n5*n4^2+656*n3*n2^2*n4^2+704*n3*n5^3*n4+960*n2*n1^3*n3+640*n2*
| n1^2*n3^2-1312*n3*n5^3*d+288*n1^3*n2^2*n3-288*d*n3*n4*n2^3+16*n4^4-312*d*n5^4*
| n2+624*n1^2*n5*n2^3+96*n2^2*n5^4+32*n1^2*n3*n4^2*n5+2032*n1^2*d^2*n3+976*n5^3*
| n2*d^2+722*n1*n2*d^4-2384*n5^2*n2^2*n1*d-800*n5^2*n2^2*d*n3+108*n1^4*d^2+1296*
| n1*n5^2*n3*n4-3776*n1*n5*n3*n4*d-1384*n2*n3*d*n5^2*n4-582*n3*n5^2*d^3-412*n3*d^
| 3*n1^2+1796*n4*d^2*n5^2*n2+695*n1*d^4*n5+520*n5*n4*n3^2*d^2+224*n3^2*n2*n5*n4^2
| +1056*n1*n2^3*n4+800*n1*n2^2*n4^2+1776*n1*n2^2*n3*n4-1832*n5*n3^2*n4*d+1712*n5*
| n1*n4^2*n2-5536*d*n5*n2^2*n4-2832*d*n3*n4*n2^2+2192*n3*n5*n2^2*n4-1896*n3*n2*n4
| ^2*d+1972*n1^2*n4*d^2-2100*n1*d^3*n4+2460*n1*n3*n4*d^2+5152*n1*n5*n4*d^2+5588*
| n1*n2*n4*d^2-16*n4^4*d+512*n3^2*n2*n4^2-6392*n5*n2*n3*n4*d-1824*d*n2*n3^2*n4-
| 968*n3*d^3*n1*n5+254*n3*n4*d^4+176*n1^2*n3^2*n4-472*n1*n2*n3^2*n4*d+352*n1*n2*
| n3^2*n4*n5-1080*n1*d*n3*n4*n2^2+1184*n5^3*n2^2+64*n1*n3^2*n4^2*n5+516*n1*n5*n4^
| 2*d^2+616*n1*n2*n4^2*d^2-384*n5^2*n3^2*n4*d+96*n1^2*n5^2*n3*n4-376*n1*n3*n5*n4^
| 2*d+48*n1^3*n4*n5^2+80*n3^3*n2^2+3424*n1*n2^2*n5*n3-9512*n1*n2^2*n5*d+8*d^2*n3^
| 4-336*n1^3*n3*n5*d+96*n5^3*n2^3+288*n1^2*n2^3*n4+96*n1*n2^4*n4-228*n4*d^3*n3^2+
| 192*n1^2*n2^2*n4^2+272*n2*n4*n3^2*n5^2-496*n1*n3*n2*n4^2*d+240*n1*n5^2*n3^2*n2+
| 16*n1*n5^2*n3^3+400*n1*n3*n2*n5*n4^2+1288*n3*n5^2*d^2*n2+128*n1^2*n2^4-632*n3^2
| *d*n1^2-936*n3^2*d*n2^2+800*n1^2*n5^3+1156*n3*n4^2*d^2+2932*d^2*n5*n2^2*n1+2904
| *n5*n1*n4*n2*d^2+64*n4*n1^2*n5^3-56*n1*n5*n3^3*d+400*n1*n5^4+432*n1^2*n3*n4*n2^
| 2+1136*n1^2*n2^3+32*n1*n2^5+524*n3^2*n2*n4*d^2+96*n1*n2^4*n3-160*d*n5*n2^4+624*
| n1^3*n2^2*n5-288*d*n5^2*n2*n3^2+32*n1*n3^3*n4*n5-40*n5^2*n3^3*d+2496*n5^3*n2*n1
| +16*n2*n3^4*n4-56*n1^4*n4*d+96*n1^4*n4*n2+16*n1^4*n4*n5-16*n3^4*n4*d+16*n3^4*n4
| *n5+640*n5*n1^3*n3-264*n1^4*n2*d+784*n1*n4*n3*n5^2*n2-592*n2*n1^3*n3*d-794*n5*
| n3*n4*d^3+1008*n5^2*n2^2*n1^2+6736*n5^2*n2*d^2+1504*n2^3+400*n2^4+264*n3^2*n2^2
| *d^2+32*n3^2*n5*n1^3+405*n3*d^4*n5+288*n5*n1*n3^2*n2^2+572*n1^3*d^2*n5+192*n2^2
| *n1^2*n3^2+144*n3*n2^4-3552*n1^2*n5^2*d-2608*n1*n5^3*d+5396*n1*n5^2*d^2+4628*n1
| ^2*d^2*n5+128*n1^4*n2^2-32*n5^5*d+160*n3^2*n5^3-624*d*n1^2*n3*n5^2+80*n3^3*n5^2
| +16*n5^5*n4+96*n3^2*n4^2*n5^2-80*n3*n5^4*d+48*n3*n5^4*n2+416*n1*n4^2*n5^2*n2-
| 5538*n2*d^3*n5+1456*n5^2*n2^2*n3-4888*n5^2*n2^2*d+5124*n2*n1^2*d^2)
""".stripMargin)
val c7 = ring(
"""
| (-44*d*n5^2
| *n2*n1^2-4*d^2*n2^3*n4+8*n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*
| d*n3-12*d^2*n5^3*n4-4*n5^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*
| d^2*n5-40*n1*d^3*n5+32*n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-
| 12*n3*d^2*n4-16*n1*d+32*n1*n5-32*n1*n4+32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16
| *n1^2*n5*n2^2*n4+104*n1*n2^2*n5+24*n1*n3*n2^2+40*n5^2*n2*n1*n3-8*n2^2*n4^2*d^2-
| 32*n1^2*n2^2*d+3*n1*n4^2*d^3+80*d*n2^2*n4+36*d*n2*n4^2-96*n5*d^2*n4-104*n2*n1^2
| *d-32*n1*n5*n4^2+25*n5*n2*n4*d^3+16*n4*d+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*n2^3-1680*n1*n2^2*n5*d*n3+748*n1*n3^2*d^2*n2+64*n3^2*n2^2*n5^2+32*n1^4
| *n5+1952*n3^2*n4*n5+1968*n3^2*n4*n2-8*n1^5*d+424*d^2*n5^3*n4+192*n1^2*n2^3*n3-
| 64*n5^4*d*n1-2768*n3^2*n4*d-8824*n1*n5*d*n3+6244*n1*d^2*n3-5416*n1*n5^2*d+8212*
| n1*d^2*n5+160*n1*n4^3-3222*n1*d^3*n5-2432*n5^3*d-192*n3^2*d*n1^2*n5-48*n3*n2^4*
| d+2752*n2*n1^2*n3+1488*n1*n2*n4^2+2224*n1*n2*n3^2-1536*n5*n2^3*d+1876*n4^2*d^2-
| 16*n1^2*n5^4-352*d*n1^3*n2^2+5576*d^2*n5^2+32*n3*n5^2*n4^3-784*n3^3*d+560*n1^3*
| n2^2+160*n5*n2^4+876*n1*n4*n5^2*d^2+160*n1*n4*n3*n5^3-16*n1^4*n5*d+5532*n3*d^2*
| n4-5248*n1*d+3872*n1*n5+2464*n1*n4+3808*n1*n2+1248*n1^2+3008*n1*n3-5312*n3*d+
| 4000*n3*n5+2592*n3*n4+3680*n3*n2+1376*n3^2-7136*n5*d+2624*n5^2+3296*n5*n4+5088*
| n5*n2-6560*n2*d+96*n2^4*n4+16*n1^2*n2*n4^3-80*n1^3*n3*n4*d+16*n1^3*n5^2-3824*n3
| *d^3+712*n3^2*n5*d^2*n2+464*n1^2*n5*n2^2*n4+192*n1*n3*n2^2*n4^2+4464*n1*n2^2*n5
| +3216*n1*n3*n2^2+96*n3*n5^3*n4^2+96*n2^2*n4^3+2784*n5^2*n2*n1*n3-4368*n5^2*n2*d
| *n3+288*n2^2*n4^2*d^2-32*n1^3*n5^3-184*n5*d^5-2360*n1^2*n2^2*d-214*n1*n4^2*d^3-
| 4512*d*n2^2*n4-2832*d*n2*n4^2+76*n5*n4^3*d^2-72*n1*d*n5*n4^3+7348*n5*d^2*n4-
| 4832*n2*n1^2*d+1456*n1*n5*n4^2+32*n3^3*n4^2*n5-1244*n5*n2*n4*d^3+16*n1*n3^4*n5-
| 4256*n4*d+272*n1^3*n2*n3*n5+64*n1^3*n4^2+32*n1^2*n4^3+2576*n5^2*n2^2-336*d*n1*
| n3^2*n5^2-16*n1^4*n5^2+336*n1*n2^3*n5*n3+16*n3^2*n5*n4^3+48*n1^4*n3-56*n4^3*n5^
| 2*d+144*n5^2*n2^3*n4-7768*n1*n5*n4*d+2720*n1*n5^2*n4+6048*n1*n5*n4*n2-5824*n1*
| n2^2*d+4624*d^2-352*n5^3*n2^2*d-10728*d*n5*n4*n2-872*d*n4*n5^2*n2^2-656*d*n4*n5
| ^3*n2-8*d*n3*n4^4-448*n5*n2^2*n4^2*d+776*n1^2*n2*n4*d^2+448*n3*n1^2*n5^2+80*n3*
| n5^2*n2^3+16*n3^2*n5^2*n1^2+64*n1*n2^2*n3^3-48*n1^3*n5^2*n3-322*n2*n4^2*d^3-
| 4280*n2*n1^2*d*n5-360*n1*d*n5^3*n4+299*n1*d^4*n4-1128*n1^2*n2*n5*n4*d-32*d*n3^2
| *n4^3+314*n5^2*d^4+64*n1*n3*n2*n4^3+109*n4^2*d^4+1312*d^2*n5*n2*n1^2+608*n1^2*
| n2^2*n3*n5-360*d*n3*n2^2*n4^2+32*n3^4*n5-112*n3^3*n2*d*n5-12360*d*n5*n2-9320*n1
| *n2*d+2224*n3^2*n5+2000*n1^2*n5-3032*n1^2*d-264*n1^2*n2*n4^2*d+392*n1*n3^2*n4*d
| ^2-80*n1*n3^3*n4*d+2064*n3^2*n2-3208*n3^2*d+2816*n3*n2^2-8824*n3*n2*d+3168*n1*
| n2^2+1728*n1*n3^2+8052*n2*d^2+8712*n5*d^2-128*n1^2*n3^2*n4*d+64*n1^2*n3^2*n4*n5
| +104*d^2*n5^4+4728*n2^2*d^2+408*n2*n4*d^4+272*n5*n2^2*n3*n4^2+1124*n1*n4^2*d^2+
| 48*n3*n2^2*n4^3-260*d^3*n5^3+4048*n5*n2^2+4512*n5^2*n2-6288*n5^2*d-7104*n1*n3*d
| +5120*n1*n3*n5-5264*d*n2^2+3104*n1*n5^2+7072*n1*n5*n2+1696*n1^2*n3-9240*n1*n5*d
| +3296*n3*n5^2-128*d*n5*n2*n4^3+324*n1*n3*n4^2*d^2-48*d*n2^2*n4^3+32*n5*n2^2*n4^
| 3+96*n1*n2^4*n5+352*n1*n4*n5^3*n2+2816*n1*n5^2*n3+208*n5^3*n2^2*n4+2384*n1*n3*
| n5*d^2*n2+116*d^2*n3^3*n4+2176*n2^2+852*n1*n3*n5^2*d^2+16*n1*n2*n3^4+336*n2*n3*
| n5^2*n4^2+2576*n1^2*n2+6528*n3*n5*n2-9496*n3*n5*d+6420*n3*d^2+5280*n1*n2*n3+
| 6340*n1*d^2+736*n1^2*n2^2*d^2-1936*d*n1^2*n4*n5+176*n1^3*n4*n5+448*n1^2*n4^2*n2
| +224*n1*n3^2*n4^2+160*n1*n3^3*n4+96*n1*n3*n4^3+448*n3^2*n4^2*n5+240*n5^4*n4-618
| *n5^2*n4*d^3+144*n1*n2*n3^2*n4^2-1102*n1*n2*d^3*n3-464*n1*n2^3*d*n3+96*n2^2*n3^
| 2*n4^2-1216*n5^2*d*n3^2-1530*n1*n2*d^3*n5-680*n1*n2^3*d*n5+1140*n1*n2^2*d^2*n3-
| 248*n5*n3^2*d*n4^2+1664*n3*n5*n4^2+1072*n1*n3*n4^2-3552*n5*d*n1^2+1137*n1*d^4+
| 2320*n5*n3^2*n2+1360*n5*n2^3+16*n1*n2^2*n4^3+240*n5^2*n2^3*n1+16*n2*n3*n4^4-8*
| n2*n4^4*d-40*n3^3*n4^2*d+5952*n5*n2*n4-5896*n1*d*n4-3128*n1*n2^2*n4*d-264*d*n5*
| n4^3-5152*n1*n2*n3*n4*d+1040*n1*n2*n3*n4^2+1232*n1*n2*n3^2*n4-6232*n3*d*n4-131*
| n3*d^5-7184*n5*n2^2*d-3442*n2*d^3*n1-76*n3^3*d^3+324*n5^3*d^2*n1-7152*n1*n2*n5*
| n4*d-7824*n1*n2*n4*d+32*n5*n2^4*n4-16*n5*n3^4*d+16*n2*n5^5-672*n1*n2*d*n5^3+
| 2368*n2*n1^2*n3*n5-3336*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-384*n3^2*d^3*n5+592*n1
| ^2*n2*n3*n4*n5+112*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-4928*n3*n2^2*d+48*n3^3*n4*n2^2
| +48*n3^2*n4*n2^3+7848*n3*d^2*n2+576*n1*n3*n2^2*n5^2+8332*n3*d^2*n5-808*n1^2*n3*
| n2^2*d+3872*n3*n5^2*n2-5624*n3*n5^2*d-40*n1^2*n5^3*d+288*n1*n3^3*n5+64*n1^2*n5^
| 2*n4^2-3112*n1*n5^2*d*n3+5028*n1*n5*d^2*n3-272*n1*n3*n5^3*d+48*n2*n3^2*n4^3+
| 2624*n1*n5^2*n2*n4-1480*d*n5^3*n4-1224*n5^2*n4^2*d-4744*n2*n5^2*n4*d-252*n3*n4^
| 2*d^3-8008*d*n5^2*n2+296*d^2*n5^2*n1^2+448*n1^2*n4^2-80*n1*n4^3*n2*d+176*n2^2*
| n5^2*n4^2+224*n3^3*n2*n5+6604*n3*n5*d^2*n2+3552*n5*n3*n2^2+48*n1*n2^3*n4^2-5248
| *n5*d^3+32*n5^5+4128*n1*n4*n3*n5+3472*n1^2*n2*n5-5696*n1*n3*n4*d+1264*n1^2*n3*
| n4-278*n4*n1^2*d^3+176*n3^2*n2^3-16*n1^2*n5^3*n3+324*n3^2*n5^2*d^2+11132*n5*d^2
| *n2-422*d^5+128*n3*n5^4+132*n3^3*n5*d^2+16*n1^2*n5*n4^3-16*d*n1^2*n4^3-3752*n5*
| n3^2*d-1000*n3*n2^3*d-3568*d*n3^2*n2-24*n3*n1^4*d+192*n1^2*n2*n3^2*n4+448*n3^3*
| n2+16*n5^2*n2^4-7920*n3*n2*n4*d+1824*n3*n2*n4^2+2512*n3*n2^2*n4-1870*n2^2*d^3+
| 608*n1*n5^2*n4^2+128*n1*n5*n4^3-176*d*n1*n4^3+3904*n1*n2*n3*n4*n5+3192*n5^2*n4*
| d^2+752*n3^2*n4*n5^2-2056*d*n5^3*n2+1056*n3^2*n2^2+112*n1^4+1296*n1*n3*n5*n4*d^
| 2-508*n2^2*n4*d^3+80*n4^3*n3*d^2-202*n2^3*d^3-2064*n4^2*d+5284*n4*d^2+16*n1^5*
| n2+256*n1*n5*n2^2*n4^2-792*n1*n5*n2*n4^2*d+48*n1*d^2*n4^3+1584*n2*n4^2+324*n3*
| n5^3*d^2+2000*n1*n5*n3^2-2976*n3*d*n1^2-1952*n1*n4^2*d-416*d*n3*n5^3*n4-744*n4^
| 2*d^3-544*n3*n2^2*d^3-1050*n3^2*d^3-115*n4*d^5-2512*n5*n2*n4^2*d+5240*n1*d^2*n4
| -480*n1^3*d*n5+208*n4^3+1660*n1*d^2*n3^2-2422*n1*d^3*n3-368*d*n3^2*n4*n2^2+3552
| *n1*n2^2*d^2+166*n1^2*d^4+112*n1^3*n4*d^2+96*n4*n5^3*n3^2+1384*n5^3*d^2+848*n4*
| n2^3+16*n5*n1^2*n3^3-8*n2^5*d-104*n3*n4^2*n1^2*d+320*n2*n3*n5^3*n4+732*n2*n5*n4
| ^2*d^2+276*n3*n2^3*d^2-192*n1*n2*n3^3*d-2944*n1*n3^2*d-3224*d^3*n4+272*n3*n4^3+
| 432*n3*n1^3+80*n1*n5^3*n4^2+32*n1*n5^2*n4^3+928*n1*n2^2*n4*d^2+144*n1^3*n2^2*n4
| -64*n3^4*d+208*n1^4*n2-614*n1*n3*n4*d^3+64*n1*n5*n2*n4^3+976*n1^3*n2+1040*n5^2*
| n4^2+192*n1*n3*n2^3*n4-3816*d^3+3164*n3*d^2*n5^2-96*n5*n3*n4^3*d+176*n3*n5*n2^3
| *n4+2544*n4*n2^2+4416*n1*n4*n2*n3-2760*n5*n4^2*d-4888*d^3*n2-1108*d^3*n1^2+640*
| n3^2*n1*n5^2+1496*n1*n3*n2*n4*d^2-608*n1^2*n2^2*n4*d-1528*n1*n4*d*n5^2*n2-718*
| n1*n2^2*d^3-304*d*n4*n1^3*n2+388*n1^2*n3*n4*d^2-106*n1^3*d^3+350*n3*d^4*n1+2636
| *n2^2*n4*d^2+2464*n1*n5*n2^2*n4+96*d^2*n2*n4^3-1440*n1*n3^2*n4*d+1008*n1*n3^2*
| n4*n5+848*n1*n3*n4^2*n5-7680*n2*d*n4+1424*n1^2*n4+1120*n1*n4^2+448*n1^3-176*d*
| n5^3*n4^2-5360*d*n5^2*n2*n1-3072*n3*d^3*n2+896*n3*n2^3+64*n1^2*n3^3*n2-88*d*n3^
| 2*n5^3-496*n1^3*n3*d+2848*n3*d^2*n2^2+4724*n3*n5*n4*d^2+4616*n3*n2*n4*d^2-2576*
| n2*n1^2*n4*d+1904*n2*n1^2*n4*n5+320*n2*n3^3*n4+288*n3*n2*n4^3+32*n1^4*n4+212*d^
| 2*n4^3+224*n1*n2^4+4*n4^4*d^2-408*n1^2*d^3*n5+32*n2*n3^4+32*n5*n3^2*n2^3+304*n5
| ^4*n2-344*n1*n5^2*n4^2*d+848*n3*n2*n5^3-168*n5*d*n3^3*n4-88*n3^2*n2^3*d-2172*d^
| 3*n5^2-248*n2^4*d+672*n3^2*n4*n2^2-432*n3^3*n4*d+304*n3^3*n4*n5+800*n5*n2^2*n4^
| 2+736*n5*n2^3*n4-1032*d*n2^2*n4^2-952*d*n2^3*n4+1640*n5*n4^2*d^2+1664*n2*n4^2*d
| ^2+224*n5*n2*n4^3+480*n3^3*n5+304*n2*n4^3-4016*n3*n5*d*n2^2+448*n1^2*n2*n3*n5^2
| -1592*n3*n5^2*d*n1*n2+429*n5*n4*d^4-296*d*n3*n4^3+144*n1*n2*n4^3+208*n5*n4^2*n1
| ^2*n2-200*n5*n4^2*n1^2*d-544*n1*n5*n3^2*n4*d+64*n3^4+304*n3^2*n2*n1^2*n5+528*n1
| *n5^3*n3-832*n1^2*n2*n3*n4*d-3210*n5*n3*d^3-112*n1*n3^2*n4^2*d+140*n1^2*n4^2*d^
| 2+160*n2*n1^2*n5^3+1936*n1*n2^2*n5^2-16*n3^4*n2*d-80*d*n1^3*n4*n5+32*n2*n3^2*n5
| ^3+48*n3*n2^3*n4^2-16*n1^4*n5*n3+816*n1^3*n2*n5+160*n2^3*n4^2+1564*n3^2*n4*d^2-
| 1504*n1*n2^3*d-1904*n5*n3*n4^2*d+388*n1^3*n2*d^2-310*n1*d^3*n3^2+200*n1^2*d^2*
| n3^2-40*n1^3*n3^2*d+992*n1^2*n2^2*n4+368*n1^2*n4^2*n5-504*n1^2*n4^2*d+16*n3*n4^
| 4+969*d^4*n4+304*n5^3*n4^2+96*n5^2*n4^3+80*n3^3*n4^2+32*n3^4*n4+64*n3^2*n4^3-
| 9440*n3*n2*n1*d+4512*n1*n5^2*n2-11432*n3*d*n2*n5+656*n3*n5*n2^3+880*n1*n3^2*n2^
| 2-1240*n1^3*n2*d-456*n5*n4*n1^2*n3*d+288*n5*n4*n1*n2^3+428*d^2*n5*n2^3-175*n2*d
| ^5-812*d^3*n5*n2^2+1776*n1*n2*n3^2*n5-2584*n1*n2*n3^2*d-432*n3^3*d*n1+1344*n3*
| n4^2+6956*n2*n4*d^2+1328*n1^2*n3*n2^2+7684*n1*n2*n5*d^2+132*n3^3*n2*d^2-135*n1*
| d^5+48*n1*n5^4*n4+176*n3^2*n4^2*d^2+456*n1*n2^3*d^2-312*n2*n3^2*n4^2*d+1616*n3^
| 2*n4+3040*n5^2*n4+1520*n5*n4^2+64*n5*n2^3*n4^2-80*d*n2^3*n4^2-8192*n3*n5*d*n1*
| n2+2088*n5*d^2*n3^2+1728*n1^2*n4*n5-2496*n1^2*n4*d+1280*n5^3*n4+2128*n1^2*n2*n4
| -368*n4^3*d+688*n3^2*n5*n2^2-2240*n1*n3*d*n5*n2*n4-864*n1*n5*n4*d^3-920*n1*n2*
| n4*d^3-320*n5*n4^2*d^3-888*n2*n3*n5*n4^2*d+912*n2^2*n4^2-48*n1*d*n3*n4^3+1136*
| n5^2*n3^2+4640*n3*n5*n4+4480*n3*n2*n4-8104*n5*d*n4-1824*d*n2^3+112*n2*n3^3*n4*
| n5-2154*n3*n4*d^3-2918*n5*n4*d^3-2766*n2*n4*d^3+649*n2*d^4*n5-400*d*n5*n2^3*n4+
| 16*n4^3*n5^3+2768*n3^2*d^2-872*n3^2*d*n5*n2*n4+148*n3^2*d^4-1448*n1*d*n5*n2^2*
| n4+192*n2*n1^3*n4*n5-464*n2*n1^2*d*n3^2+2036*n3^2*d^2*n2+1136*n1*n2^3*n5+4204*
| n5*n2^2*d^2+688*n5^2*n2*n3^2+1392*n5^2*n2*n1^2+6364*n5*n2*n4*d^2-504*n3^3*d*n5+
| 1056*n1*n5^3+1232*n1*n2^3+400*n1^3*n5+336*n1*n2*n3^3+352*n5^4+80*n1^3*n3^2+7008
| *n1*n3*n2*n5+2912*n3*n5^2*n4+2756*d^2*n1^2-840*n1*n3*d*n5^2*n4+480*n3*n2^3*n4+
| 960*n2*n5^2*n4^2+1136*n2*n5^3*n4+384*n5*n1^2*n3^2+144*n1^3*n5^2*n2+1120*n5^3*n3
| -2584*d*n5*n2*n3^2+784*n1*n2^3*n3+1172*d^2*n5*n2^2*n4+176*n3*n5*n4^3+1536*n5^2*
| n2^2*n4+656*n1*n4*n5^3+832*n4^2+356*n5^2*n4^2*d^2+568*n1^2*n5*d^2*n3-512*n1^3*
| n2*d*n5+160*n1^3*n3*n4*n2+424*d^2*n3^3+240*n3^2*n5*n2^2*n4-512*n1*n2^2*d*n3^2-
| 456*d*n5^3*n2*n3+32*n4^2*n5^4+1748*d^4-1008*n1*n2*d*n5*n3^2+176*n1*n4*n3^2*n5^2
| -176*d*n2*n3^3*n4+596*n2*n3*n4^2*d^2-360*n3^2*n5*d*n2^2+384*n2*n1^2*n4*n5^2-
| 1408*n1^2*n5*d*n3*n2+600*n1*n5*d^2*n3^2+256*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+32
| *n1*n3*n5*n4^3+544*n1*n5^2*n2^2*n4-488*n3^3*n2*d+16*n1*n5^4*n3-12800*n5*n2*n1*d
| +944*n1^2*n5^2+224*n5*n4^3+42*d^6+1964*n2*n3*n5*n4*d^2+68*d^2*n2^4+16*n2*n4^4-
| 618*n2*d^3*n1^2-136*d*n4*n5^4+96*n1^3*n2^3+160*n1*n3*n5^2*n4^2+16*n3*n2^4*n4+
| 5920*n3*n5*n4*n2-8160*n3*n5*n4*d+112*n1*n2*n3^3*n5+64*n3*n5^4*n4+1584*n1*n5^2*
| n2*d^2+112*n3*n5^3*n2^2+4416*n1*n5*n4+3296*n1*n4*n3-3808*n1*d^3-848*d*n1^3-392*
| n5^2*n3*n4^2*d+96*n1*n2*n3^3*n4+80*n2*n5*n1^4+540*n5*n3*n4^2*d^2+208*n1^2*n3*n4
| ^2+1552*n2*n3^2*n4*n5+880*n1^2*n3*n4*n5+1408*n1^2*n3*n4*n2-1408*n1^2*n3*n4*d+
| 808*n3*n2^2*n4*d^2-384*n3^2*d^3*n2+116*n1*d^2*n3^3+1562*n5*d^4+64*n5^2*n3^3*n4+
| 1312*n1*n4*n3^2+2624*n1*n4*n2^2+8516*n2*n1*d^2+140*n1^3*d^2*n3+1792*n5^3*n2-
| 3328*n3*d*n5^2*n4+2464*n2*n3*n4*n5^2-1672*n1*n5*n4^2*d-1736*n1*n2*n4^2*d-3104*
| n1*d*n5^2*n4-1184*n1*n3*n4^2*d-648*n3^2*n4^2*d+688*n3*n5^2*n4^2-906*d^3*n5^2*n2
| +16*n2^5+480*n3^3+1408*n5^3+1056*n2^3*d^2-344*d*n2*n4^3-1096*n1^2*n2^2*n5*d+447
| *n3*d^4*n2+1124*n3*n5*n2^2*d^2-560*n2*n5^2*n4^2*d+840*n5^2*n2^2*d^2+80*n3^3*n1^
| 2+32*n1*n3^4-1260*d^3*n5*n2*n3-344*d*n5*n2^3*n3+1004*n1^2*d^2*n3*n2-2336*n3*n4^
| 2*d+3520*n5*n2^2*n4+2128*n5*n2*n4^2+1856*n5*n3*n1^2+1872*n1^2*n2^2-596*d^3*n5^2
| *n1+400*n3^3*n4+592*n3^2*n4^2+400*n1*n3^3+352*n1^3*n4+656*n1^2*n3^2-3840*n1*n3*
| d*n2^2+5600*n1*n3*d^2*n2+524*n1^3*d^2-888*n3*n2*n4*d^3-2064*n1^2*n5*d*n3-2200*
| n1*n5*d*n3^2+16*n1^5+560*n1^2*n4*n5^2+160*n1^3*n4*n3-400*n1^3*n4*d+496*n1^3*n4*
| n2+536*n1^2*n5*n4*d^2-288*d*n1^2*n4*n5^2-136*n1^4*d+112*n2*n5^4*n4-368*n1*d*n2^
| 3*n4-312*n1*d*n2^2*n4^2-1184*n3*d*n5*n2^2*n4-56*n3^3*n2^2*d-48*d*n2^4*n4+4032*
| n5^2*n4*n2-5432*n5^2*n4*d-32*n1^3*n4^2*d-360*d*n1^2*n2^3+4352*n1*n2*n4-160*n3*d
| *n2*n4^3+944*n5^2*n3*n4*d^2+1760*n1^2*n2^2*n5+320*n1*n5^3*n3*n2+144*n2*n5^3*n4^
| 2+48*n2*n5^2*n4^3+416*n2^2*n3*n4*n5^2+1469*n2*d^4-384*d*n5^4-40*n1^2*n3^3*d+
| 1552*n3*n2*n5*n4^2+656*n3*n2^2*n4^2+736*n3*n5^3*n4+688*n2*n1^3*n3+784*n2*n1^2*
| n3^2-1208*n3*n5^3*d+192*n1^3*n2^2*n3-256*d*n3*n4*n2^3+16*n4^4-168*d*n5^4*n2+272
| *n1^2*n5*n2^3+48*n2^2*n5^4+64*n1^2*n3*n4^2*n5+1728*n1^2*d^2*n3+584*n5^3*n2*d^2+
| 519*n1*n2*d^4-1152*n5^2*n2^2*n1*d-688*n5^2*n2^2*d*n3+40*n1^4*d^2+1536*n1*n5^2*
| n3*n4-4648*n1*n5*n3*n4*d-1400*n2*n3*d*n5^2*n4-588*n3*n5^2*d^3-332*n3*d^3*n1^2+
| 1380*n4*d^2*n5^2*n2+471*n1*d^4*n5+616*n5*n4*n3^2*d^2+224*n3^2*n2*n5*n4^2+624*n1
| *n2^3*n4+544*n1*n2^2*n4^2+1728*n1*n2^2*n3*n4-2200*n5*n3^2*n4*d+1360*n5*n1*n4^2*
| n2-4088*d*n5*n2^2*n4-2864*d*n3*n4*n2^2+2128*n3*n5*n2^2*n4-2096*n3*n2*n4^2*d+
| 1448*n1^2*n4*d^2-2052*n1*d^3*n4+3252*n1*n3*n4*d^2+4508*n1*n5*n4*d^2+4660*n1*n2*
| n4*d^2-16*n4^4*d+560*n3^2*n2*n4^2-6856*n5*n2*n3*n4*d-2240*d*n2*n3^2*n4-948*n3*d
| ^3*n1*n5+311*n3*n4*d^4+256*n1^2*n3^2*n4-704*n1*n2*n3^2*n4*d+512*n1*n2*n3^2*n4*
| n5-1008*n1*d*n3*n4*n2^2+640*n5^3*n2^2+80*n1*n3^2*n4^2*n5+476*n1*n5*n4^2*d^2+504
| *n1*n2*n4^2*d^2-424*n5^2*n3^2*n4*d+96*n1^2*n5^2*n3*n4-464*n1*n3*n5*n4^2*d-16*n1
| ^3*n4*n5^2+112*n3^3*n2^2+2864*n1*n2^2*n5*n3-5392*n1*n2^2*n5*d+16*d^2*n3^4-72*n1
| ^3*n3*n5*d+48*n5^3*n2^3+144*n1^2*n2^3*n4+48*n1*n2^4*n4-292*n4*d^3*n3^2+96*n1^2*
| n2^2*n4^2+288*n2*n4*n3^2*n5^2-592*n1*n3*n2*n4^2*d+304*n1*n5^2*n3^2*n2+48*n1*n5^
| 2*n3^3+464*n1*n3*n2*n5*n4^2-16*n1*n3^4*d+1220*n3*n5^2*d^2*n2+64*n1^2*n2^4-728*
| n3^2*d*n1^2-1176*n3^2*d*n2^2+96*n1^2*n5^3+16*n1^3*n4^2*n5+1336*n3*n4^2*d^2+1620
| *d^2*n5*n2^2*n1+2100*n5*n1*n4*n2*d^2+32*n4*n1^2*n5^3-152*n1*n5*n3^3*d+128*n1*n5
| ^4+336*n1^2*n3*n4*n2^2+576*n1^2*n2^3+16*n1*n2^5+632*n3^2*n2*n4*d^2+64*n1*n2^4*
| n3-80*d*n5*n2^4+256*n1^3*n2^2*n5-360*d*n5^2*n2*n3^2+64*n1*n3^3*n4*n5-56*n5^2*n3
| ^3*d+1152*n5^3*n2*n1+16*n2*n3^4*n4-16*n1^4*n4*d+48*n1^4*n4*n2-16*n1^4*n4*n5-16*
| n3^4*n4*d+16*n3^4*n4*n5+160*n5*n1^3*n3-128*n1^4*n2*d+800*n1*n4*n3*n5^2*n2-416*
| n2*n1^3*n3*d-902*n5*n3*n4*d^3+384*n5^2*n2^2*n1^2+4688*n5^2*n2*d^2+1040*n2^3+224
| *n2^4+324*n3^2*n2^2*d^2-16*n3^2*n5*n1^3+459*n3*d^4*n5+352*n5*n1*n3^2*n2^2+140*
| n1^3*d^2*n5+192*n2^2*n1^2*n3^2+96*n3*n2^4-1064*n1^2*n5^2*d-1176*n1*n5^3*d+3124*
| n1*n5^2*d^2+2092*n1^2*d^2*n5+64*n1^4*n2^2-16*n5^5*d+176*n3^2*n5^3-216*d*n1^2*n3
| *n5^2+112*n3^3*n5^2+16*n5^5*n4+96*n3^2*n4^2*n5^2-64*n3*n5^4*d+48*n3*n5^4*n2+304
| *n1*n4^2*n5^2*n2-4410*n2*d^3*n5+1280*n5^2*n2^2*n3-2960*n5^2*n2^2*d+3004*n2*n1^2
| *d^2)
""".stripMargin)
val c9 = ring(
"""
| (16*n1^4*n2*n3+16*n1*n2^2*n3^2*d^2+12*d^3*n4^3-1136*d*n5^2*n2*n1^2-152*d^
| 2*n2^3*n4+16*n1^3*n2*n3^2-56*n1^2*n2*n5*n3^2*d+160*n1*n5^4*n2-128*n4*n2-208*n1*
| n3*n5*n2^2*n4+16*n1*n5^3*n3^2-32*n1*n2^4*d+16*n1*n3^2*n2^3-632*n1*n2^2*n5*d*n3-
| 128*n1*d*n5^2*n2^3+48*n1*n3^2*d^2*n2+27*n2*n3*n1*d^4+48*n1^4*n5-32*n3^2*n4*n5-
| 32*n3^2*n4*n2-208*n2*n5^3*n4*d^2+46*n1*n5^2*n4*d^3-16*n2^3*n4^3-32*n1^3*n3*n5^2
| *d-48*n1^3*n5*d^3-130*n2*n3*n1*n5*d^3-316*d^2*n5^3*n4+48*n1^2*n2^3*n3-128*n5^4*
| d*n1+16*n3^2*n4*d-400*n1*n5*d*n3+136*n1*d^2*n3-848*n1*n5^2*d+736*n1*d^2*n5-32*
| n1*n4^3-496*n1*d^3*n5+12*n5*d^2*n1^4-72*n3^2*d*n1^2*n5+320*n2*n1^2*n3-288*n1*n2
| *n4^2+32*n1*n2*n3^2-136*n4^2*d^2+48*n1^2*n5^4-96*d*n1^3*n2^2-104*d*n1*n3*n5*n2^
| 3+40*d^2*n5*n2*n1*n3^2+96*n1^3*n2^2-8*n1^4*n3*d*n2+97*d^4*n5*n1*n2-256*n1*n4*n5
| ^2*d^2-48*n1*n4*n3*n5^3-8*n1^4*d*n5^2-48*n1^4*n5*d-136*n3*d^2*n4-64*n1*d+128*n1
| *n5-128*n1*n4+128*n1*n2+128*n1^2-128*n5*n4-32*n2^4*n4-16*n1^2*n2*n4^3-16*n1^3*
| n3*n4*d+208*n1^3*n5^2-16*n1^3*n3*d^3-72*d*n1^3*n2^2*n5+224*n1^2*n5*n2^2*n4-64*
| n1*n3*n2^2*n4^2-19*n1*n2*n4*d^4-24*d*n1^3*n4*n5^2+36*n1^2*n5^2*n4*d^2-16*d*n1^2
| *n4*n5^3+16*d*n3*n5^4*n4-32*n5^2*n2*n1^2*n4^2+736*n1*n2^2*n5+224*n1*n3*n2^2-32*
| n3*n5^3*n4^2-48*n2^2*n4^3+560*n5^2*n2*n1*n3+51*d^4*n1*n5^2-252*n2^2*n4^2*d^2-8*
| n1*n2^3*d*n3^2-48*n1*n2^2*n5*n3^2*d-256*d*n5^2*n2*n1^2*n3+48*n1^3*n5^3-592*n1^2
| *n2^2*d+104*n1*n4^2*d^3+640*d*n2^2*n4+384*d*n2*n4^2-48*n5*n4^3*d^2+72*n1*d*n5*
| n4^3-736*n5*d^2*n4-928*n2*n1^2*d-320*n1*n5*n4^2+632*n5*n2*n4*d^3+64*n4*d+208*n1
| ^3*n2*n3*n5-16*n1^2*n4^3+96*n2*n3*n5^2*n4^2*d-56*d*n1*n3^2*n5^2+16*n1^4*n5^2+
| 176*n1*n2^3*n5*n3+16*n1^4*n3+56*n4^3*n5^2*d-224*n5^2*n2^3*n4+704*n1*n5*n4*d-288
| *n1*n5^2*n4-544*n1*n5*n4*n2-640*n1*n2^2*d+1552*d*n5*n4*n2+912*d*n4*n5^2*n2^2+
| 688*d*n4*n5^3*n2+632*n5*n2^2*n4^2*d+140*n1^2*n2*n4*d^2+304*n3*n1^2*n5^2+32*n3^2
| *n5^2*n1^2+64*n1^3*n5^2*n3+10*d^3*n2*n4^3+172*n2*n4^2*d^3-1840*n2*n1^2*d*n5+120
| *n1*d*n5^3*n4+24*n2^3*n1^2*d^2-56*n1*d^4*n4-328*n1^2*n2*n5*n4*d-32*n5^2*n2^2*n4
| ^3-51*n5^2*n4*d^4+48*n5*d*n2^2*n4^3+62*n5*n1*n4^2*d^3-64*n1*n2*n5^3*n4^2+144*d*
| n2*n5^3*n4^2+44*n3*n1^3*d^2*n2-10*n5*n1*n3^2*d^3-38*n4^2*d^4+1084*d^2*n5*n2*n1^
| 2+368*n1^2*n2^2*n3*n5+112*d*n3*n2^2*n4^2-480*n1*n2*d+448*n1^2*n5-416*n1^2*d+88*
| n1^2*n2*n4^2*d-32*n1*n3^2*n4*d^2-162*n5*n1*n2^2*d^3-96*n1*d*n5^4*n2-192*n1*d*n5
| ^3*n2^2+256*n1*n2^2+34*n1*n2^2*d^4+16*n1^2*n3^2*n4*d-16*n1^2*n3^2*n4*n5+5*d^5*
| n4^2-138*n2*n4*d^4-16*n2*n5^3*n4^3-160*n5*n2^2*n3*n4^2-268*n1*n4^2*d^2-32*n2*n5
| ^4*n4^2-64*n1*n3*d+128*n1*n3*n5+320*n1*n5^2+576*n1*n5*n2+128*n1^2*n3-512*n1*n5*
| d+128*d*n5*n2*n4^3-64*n1*n3*n4^2*d^2+56*d*n2^2*n4^3-80*n5*n2^2*n4^3+48*n1*n2^4*
| n5+64*n1*n2^3*n3*n5^2-128*n1*n4*n5^3*n2+256*n1*n5^2*n3+62*n5^3*n4*d^3-36*d^2*n5
| ^4*n4+144*n2*n3*d*n5^3*n4-320*n5^3*n2^2*n4+624*n1*n3*n5*d^2*n2+300*n1*n3*n5^2*d
| ^2-160*n2*n3*n5^2*n4^2+384*n1^2*n2+128*n1*n2*n3+176*n1*d^2-52*n5^3*n4^2*d^2+328
| *n1^2*n2^2*d^2-152*d*n1^2*n4*n5+112*n1^3*n4*n5-80*n1^2*n4^2*n2-112*n5^4*n4+336*
| n5^2*n4*d^3-144*n1*d*n3*n5^3*n2+192*d*n5^3*n2^2*n4-172*n1*n2*d^3*n3-128*n1*n2^3
| *d*n3-632*n1*n2*d^3*n5-384*n1*n2^3*d*n5+8*d*n5^3*n4^3+16*d*n5^4*n4^2+60*n5^2*n4
| ^2*d^3+252*n1*n2^2*d^2*n3-64*n3*n5*n4^2-64*n1*n3*n4^2-1104*n5*d*n1^2+104*n1*d^4
| -32*n1*n2^2*n4^3+224*n5^2*n2^3*n1+48*n2*n3^2*d*n5^2*n4+16*n2*n1^4*n5^2-576*n5*
| n2*n4+352*n1*d*n4+176*n1*n2^2*n4*d+72*d*n5*n4^3+432*n1*n2*n3*n4*d-128*n1*n2*n3*
| n4^2-64*n1*n2*n3^2*n4+64*n3*d*n4-34*n2^2*n4*d^4+272*n1*d^2*n5^2*n2^2+208*n1*d^2
| *n5^3*n2+52*n1*d^2*n3*n5^3+24*n1^3*d^2*n2^2-436*n2*d^3*n1+316*n5^3*d^2*n1+52*n5
| *n1*n3*n4*d^3-36*n5*n1*n2^2*n4*d^2+57*n5*n1^2*d^4+4*n3*n1^3*n4*d^2+6*n1*n3^2*n4
| *d^3-64*n3*n1*n5*n2^2*n4^2-44*n3*n1*n2^2*n4*d^2-192*n5*n3*n2^2*n4*d^2+872*n1*n2
| *n5*n4*d+544*n1*n2*n4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*n1^2-216*n1^2*d*n3*n5*n2^2
| -176*n3*n5*n2^3*n4-256*n4*n2^2-256*n1*n4*n2*n3+400*n5*n4^2*d-316*d^3*n1^2+48*n3
| ^2*n1*n5^2-244*n1*n3*n2*n4*d^2-176*n1^2*n2^2*n4*d-30*n1^2*n2*n4*d^3-32*n3*n2^2*
| n4^2*d^2-8*n3*n1^2*n4^2*d^2+432*n1*n4*d*n5^2*n2-232*n1*n2^2*d^3-24*n1*n5*n2^4*d
| -128*d*n4*n1^3*n2-24*n1^2*n3*n4*d^2-88*n1^3*d^3+38*n3*d^4*n1-584*n2^2*n4*d^2-
| 208*n1*n5*n2^2*n4-48*d^2*n2*n4^3+56*n1*n3^2*n4*d-64*n1*n3^2*n4*n5-128*n1*n3*n4^
| 2*n5+480*n2*d*n4-128*n1*n4^2+128*n1^3+184*d*n5^3*n4^2+8*n2*n1^4*d^2+48*n2^3*n5*
| n1^2*n3-1648*d*n5^2*n2*n1+16*n1*n5^5-160*n1^3*n3*d-420*n3*n5*n4*d^2-396*n3*n2*
| n4*d^2-208*n2*n1^2*n4*d+240*n2*n1^2*n4*n5+16*n1^4*n4-24*d^2*n4^3+32*n1*n2^4-392
| *n1^2*d^3*n5+288*n1*n5^2*n4^2*d-72*n1^2*d^3*n3*n5+20*n3^2*d^2*n5*n1^2+16*n1^3*
| n3*n4*n5-48*n3^2*n4*n2^2-512*n5*n2^2*n4^2-336*n5*n2^3*n4+416*d*n2^2*n4^2+272*d*
| n2^3*n4-420*n5*n4^2*d^2-396*n2*n4^2*d^2-96*n5*n2*n4^3-16*n2^2*n1^2*n3^2*d-32*n2
| *n4^3+432*n1^2*n2*n3*n5^2-704*n3*n5^2*d*n1*n2-160*n5*n4*d^4+46*n2*n1^2*d^4-64*
| n1*n2*n4^3-112*n5*n4^2*n1^2*n2+104*n5*n4^2*n1^2*d+72*n1*n5*n3^2*n4*d-224*n1^3*
| n5^2*d+96*n3^2*n2*n1^2*n5+32*n1*n2^2*n3^2*n5^2-16*d*n3^2*n5^2*n1^2+160*n1*n5^3*
| n3+16*n1^2*n2*n3*n4*d-56*n1^2*n4^2*d^2+368*n2*n1^2*n5^3+752*n1*n2^2*n5^2-128*d*
| n1^3*n4*n5-32*n3*n2^3*n4^2+16*n1^4*n5*n3+432*n1^3*n2*n5-112*n2^3*n4^2-24*n3^2*
| n4*d^2-272*n1*n2^3*d+144*n5*n3*n4^2*d+200*n1^3*n2*d^2-116*n1*n5^2*n2*n4*d^2+224
| *d*n5^2*n2^2*n4^2+48*d*n5^2*n2*n4^3-80*n1*n5^2*n4^2*d^2-192*n5*n2^2*n4^2*d^2-13
| *n3*n1*d^4*n4-32*n5*n1*n2^2*n4^3-4*n1^2*n3^2*n4*d^2+12*n3*n1*n4^2*d^3+32*n1*n5^
| 3*n4^2*d+208*n5^2*n2*n4*d^3-12*n1*d^3*n3^2+32*n1^2*d^2*n3^2-16*n1^3*n3^2*d+144*
| n1^2*n2^2*n4-96*n1^2*n4^2*n5+104*n1^2*n4^2*d-104*d^4*n4-160*n5^3*n4^2-48*n5^2*
| n4^3-384*n3*n2*n1*d+864*n1*n5^2*n2-200*n5*n1*n2*n4^2*d^2-8*n5*n1^3*n3*n4*d-64*
| n1*n5^2*n2*n3*n4^2+48*n1*n3^2*n2^2-368*n1^3*n2*d+32*n5*n4*n1^2*n3*d+32*n5*n4*n1
| *n2^3+96*n1*n2*n3^2*n5-72*n1*n2*n3^2*d-664*n2*n4*d^2+240*n1^2*n3*n2^2+16*n1*n5^
| 2*n3^2*d^2+1508*n1*n2*n5*d^2-17*n1*n2*d^5-28*n1*d^5-16*n1*n5^4*n4+152*n1*n2^3*d
| ^2-24*n2^2*n1^3*n3*d-320*n5^2*n4-128*n5*n4^2-176*n5*n2^3*n4^2+128*d*n2^3*n4^2-
| 968*n3*n5*d*n1*n2+64*n1^2*n4*n5-32*n1^2*n4*d-288*n5^3*n4+96*n1^2*n2*n4+16*n4^3*
| d+552*n1*n3*d*n5*n2*n4+168*n5*n1*d*n2^2*n4^2+8*n3*n1^2*n2*n5*n4*d-160*n5*n1*n3*
| n2*n4*d^2+208*n1*n5*n4*d^3+148*n1*n2*n4*d^3+184*n5*n4^2*d^3+256*n2*n3*n5*n4^2*d
| -224*n2^2*n4^2-128*n3*n5*n4-128*n3*n2*n4+512*n5*d*n4+108*n1*n5*d^2*n2^3-120*n1^
| 3*n2*d*n3*n5-24*n1^3*n5^3*d+32*n5*n1^2*n3^2*n2^2+108*n3*n4*d^3+496*n5*n4*d^3+
| 436*n2*n4*d^3+8*n1*n2^4*d^2+384*d*n5*n2^3*n4-16*n4^3*n5^3+128*n3^2*d*n5*n2*n4+
| 184*n1*d*n5*n2^2*n4+160*n2*n1^3*n4*n5-72*n2*n1^2*d*n3^2+36*n5*n1^3*n4*d^2+336*
| n1*n2^3*n5+960*n5^2*n2*n1^2-1508*n5*n2*n4*d^2+288*n1*n5^3+160*n1*n2^3+288*n1^3*
| n5+16*n1^3*n3^2+108*n5*n1^2*n2*n4*d^2+16*n1*n5^2*n3^2*n4*d+16*n1*d*n2^2*n4^3+20
| *n3*n2*n4^2*d^3+50*n3*n2^2*n4*d^3-20*n5*n1*d^2*n4^3-28*n5*n1^2*n4^2*d^2+162*n5*
| n2^2*n4*d^3+10*n5*n3^2*n4*d^3-20*n1*n2*n4^3*d^2-60*n1*n2^2*n4^2*d^2+480*n1*n3*
| n2*n5-256*n3*n5^2*n4+520*d^2*n1^2+232*n1*n3*d*n5^2*n4-112*n3*n2^3*n4-560*n2*n5^
| 2*n4^2-560*n2*n5^3*n4+64*n5*n1^2*n3^2+256*n1^3*n5^2*n2+36*n5^4*d^2*n1+112*n1*n2
| ^3*n3-820*d^2*n5*n2^2*n4-752*n5^2*n2^2*n4-112*n1*n4*n5^3-300*n5^2*n4^2*d^2+372*
| n1^2*n5*d^2*n3-480*n1^3*n2*d*n5+16*n1^3*n3*n4*n2-80*n3^2*n5*n2^2*n4-56*n1*n2^2*
| d*n3^2-32*n4^2*n5^4-128*n1*n2*d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^2*n4*d^3-97*n5*n2*n4*d^4+8*n5*n1^2*d*n4^3-24*n5*n1^2*d^3*n4-24*
| n1^2*n2*n4^2*d^2+8*d*n1^2*n2*n4^3+8*n3^2*d*n5^3*n4+16*n1^2*n5^2*n4^2*d+50*n2^2*
| n4^2*d^3-816*n1^2*n2^2*n5*d+704*n2*n5^2*n4^2*d-112*n1^2*n2*n5^2*n4*d+112*n3*n1*
| n5*n2*n4^2*d-32*n5*n1^2*n2*n3*n4^2+64*n5*n1^2*n2*n4^2*d-16*n3^2*n5^2*n4*d^2-16*
| n3^2*n2^2*n4*d^2-272*d^2*n5^2*n2^2*n4+340*n1^2*d^2*n3*n2+32*n3*n4^2*d-736*n5*n2
| ^2*n4-480*n5*n2*n4^2+352*n5*n3*n1^2+352*n1^2*n2^2-336*d^3*n5^2*n1+64*n1^3*n4+32
| *n1^2*n3^2-416*n1*n3*d*n2^2+396*n1*n3*d^2*n2+240*n1^3*d^2+16*n1^3*n2*n5*n3^2+36
| *n1*d^2*n3*n2^3-62*n1*n5^3*d^3-8*n1*n5^5*d+172*n3*n2*n4*d^3-632*n1^2*n5*d*n3-72
| *n1*n5*d*n3^2-11*n1^2*d^5+96*n1^2*n4*n5^2+16*n1^3*n4*n3-112*n1^3*n4*d+112*n1^3*
| n4*n2+108*n1^2*n5*n4*d^2-120*d*n1^2*n4*n5^2-48*n1^4*d-160*n2*n5^4*n4-32*n1*d*n2
| ^3*n4+216*n1*d*n2^2*n4^2+632*n3*d*n5*n2^2*n4-16*n1*n5^4*d*n3+32*d*n2^4*n4-864*
| n5^2*n4*n2+848*n5^2*n4*d-96*d*n1^2*n2^3-24*n1^2*d*n5^4-256*n1*n2*n4+48*n2*n1^3*
| n5^3-300*n5^2*n3*n4*d^2+720*n1^2*n2^2*n5+240*n1*n5^3*n3*n2+48*n1*n5^4*n2^2+16*
| n1*n5^5*n2-240*n2*n5^3*n4^2-80*n2*n5^2*n4^3-368*n2^2*n3*n4*n5^2-192*n3*n2*n5*n4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^2-32*n5*n3*n2^3*n4^2+
| 16*n3^2*n5*n1^3+8*n1^2*n2*n3^2*n4*d-64*n1*n3*n5^2*n2^2*n4+48*n2^3*n1*n5^3+80*n5
| *n1*n3^2*n2^2+80*n1^2*n5^3*n3*n2+264*n1^3*d^2*n5-80*n3*n2^2*n5^3*n4-16*n5*n1^2*
| n2^2*n4^2+104*n5*d*n2^3*n4^2+32*n2^2*n1^2*n3^2+48*n1^3*n5^2*n2^2-960*n1^2*n5^2*
| d-528*n1*n5^3*d+812*n1*n5^2*d^2+996*n1^2*d^2*n5+332*n1^2*n5^2*d^2*n2+104*n5*n3*
| n2^3*n4*d-106*n1^2*d^3*n5^2+60*n1^3*n5^2*d^2-8*n1*n5^3*d*n3^2-16*n1*n5^3*n2^2*
| n4+16*d*n1*n2^3*n4^2-16*n2*n5^5*n4-20*n1*n5*d^5-16*n3*n1*n5*n2^3*n4-32*n5*n1*n3
| ^2*n2^2*n4-210*n1^2*n2*n5*d^3+240*n1^2*n2*n3*d^2*n5-344*d*n1^2*n3*n5^2-8*n1*d*
| n2^4*n4+48*n1^3*n5*n2^2*n4-64*n3*n5^2*n2^3*n4+128*d*n5^2*n2^3*n4-32*n3^2*n5^2*
| n2^2*n4+36*n2*n1^3*n4*d^2-16*n5^5*n4+40*n1*d*n5^2*n2^2*n4+24*n3*n1*d*n5^3*n4+48
| *n5*d*n3^2*n4*n2^2-66*n1^2*d^3*n3*n2-352*n1*n4^2*n5^2*n2+96*n5*n3*n2^2*n4^2*d-
| 40*n5*n1*n3*n4^2*d^2+824*n2*n1^2*d^2+16*n1*n2^4*n3*n5)
""".stripMargin)
val c10 = ring(
"""
| (192+368*n1+560*n2+432*n3+240*n4+608*n5-656*d+136*n5^2*n2^3+592
| *n4*n2+73*d^4*n3+232*n3^2*n4*n5+256*n3^2*n4*n2-272*n3^2*n4*d-1128*n1*n5*d*n3+
| 682*n1*d^2*n3-840*n1*n5^2*d+1044*n1*d^2*n5+8*n1*n4^3-214*n1*d^3*n5-520*n5^3*d+
| 328*n2*n1^2*n3+152*n1*n2*n4^2+344*n1*n2*n3^2-284*n5*n2^3*d+122*n4^2*d^2+926*d^2
| *n5^2-140*n3^3*d+32*n1^3*n2^2+56*n5*n2^4+512*n3*d^2*n4-980*n1*d+864*n1*n5+400*
| n1*n4+880*n1*n2+248*n1^2+592*n1*n3-1140*n3*d+1056*n3*n5+432*n3*n4+976*n3*n2+344
| *n3^2-1640*n5*d+736*n5^2+608*n5*n4+1440*n5*n2-1524*n2*d+24*n2^4*n4-468*n3*d^3+
| 896*n1*n2^2*n5+560*n1*n3*n2^2+8*n2^2*n4^3+288*n5^2*n2*n1*n3-620*n5^2*n2*d*n3-
| 172*n1^2*n2^2*d-688*d*n2^2*n4-248*d*n2*n4^2+768*n5*d^2*n4-600*n2*n1^2*d+112*n1*
| n5*n4^2-660*n4*d+744*n5^2*n2^2-788*n1*n5*n4*d+304*n1*n5^2*n4+800*n1*n5*n4*n2-
| 968*n1*n2^2*d+888*d^2-1440*d*n5*n4*n2+16*n3*n1^2*n5^2-312*n2*n1^2*d*n5+8*n3^4*
| n5-2872*d*n5*n2-1736*n1*n2*d+592*n3^2*n5+368*n1^2*n5-472*n1^2*d+552*n3^2*n2-648
| *n3^2*d+776*n3*n2^2-1896*n3*n2*d+744*n1*n2^2+296*n1*n3^2+1530*n2*d^2+1628*n5*d^
| 2+840*n2^2*d^2+42*n1*n4^2*d^2+1216*n5*n2^2+1312*n5^2*n2-1448*n5^2*d-1112*n1*n3*
| d+944*n1*n3*n5-1272*d*n2^2+688*n1*n5^2+1568*n1*n5*n2+248*n1^2*n3-1664*n1*n5*d+
| 896*n3*n5^2+432*n1*n5^2*n3+632*n2^2+472*n1^2*n2+1776*n3*n5*n2-2024*n3*n5*d+1106
| *n3*d^2+1024*n1*n2*n3+958*n1*d^2-80*d*n1^2*n4*n5+24*n1^2*n4^2*n2+8*n3^2*n4^2*n5
| +16*n5^4*n4-180*n5^2*d*n3^2+112*n3*n5*n4^2+64*n1*n3*n4^2-440*n5*d*n1^2+64*n1*d^
| 4+632*n5*n3^2*n2+440*n5*n2^3+1104*n5*n2*n4-760*n1*d*n4-260*n1*n2^2*n4*d-4*d*n5*
| n4^3-304*n1*n2*n3*n4*d+48*n1*n2*n3*n4^2+72*n1*n2*n3^2*n4-824*n3*d*n4-1600*n5*n2
| ^2*d-239*n2*d^3*n1-500*n1*n2*n5*n4*d-904*n1*n2*n4*d+160*n2*n1^2*n3*n5-200*n2*n1
| ^2*n3*d-1000*n3*n2^2*d+1212*n3*d^2*n2+1266*n3*d^2*n5+1008*n3*n5^2*n2-1100*n3*n5
| ^2*d+16*n1*n3^3*n5-240*n1*n5^2*d*n3+330*n1*n5*d^2*n3+208*n1*n5^2*n2*n4-100*d*n5
| ^3*n4-44*n5^2*n4^2*d-404*n2*n5^2*n4*d-1700*d*n5^2*n2+32*n1^2*n4^2+64*n3^3*n2*n5
| +700*n3*n5*d^2*n2+944*n5*n3*n2^2-704*n5*d^3+8*n5^5+384*n1*n4*n3*n5+504*n1^2*n2*
| n5-488*n1*n3*n4*d+88*n1^2*n3*n4+48*n3^2*n2^3+1878*n5*d^2*n2-25*d^5+32*n3*n5^4-
| 716*n5*n3^2*d-168*n3*n2^3*d-688*d*n3^2*n2+120*n3^3*n2-936*n3*n2*n4*d+152*n3*n2*
| n4^2+408*n3*n2^2*n4-182*n2^2*d^3+16*n1*n5^2*n4^2-4*d*n1*n4^3+256*n1*n2*n3*n4*n5
| +198*n5^2*n4*d^2+48*n3^2*n4*n5^2-312*d*n5^3*n2+288*n3^2*n2^2+8*n1^4-184*n4^2*d+
| 662*n4*d^2+184*n2*n4^2+272*n1*n5*n3^2-288*n3*d*n1^2-144*n1*n4^2*d-26*n4^2*d^3-
| 80*n3^2*d^3-140*n5*n2*n4^2*d+472*n1*d^2*n4-24*n1^3*d*n5+8*n4^3+98*n1*d^2*n3^2-
| 137*n1*d^3*n3+310*n1*n2^2*d^2+158*n5^3*d^2+192*n4*n2^3-344*n1*n3^2*d-288*d^3*n4
| +8*n3*n4^3+32*n3*n1^3-8*n3^4*d+8*n1^4*n2+104*n1^3*n2+80*n5^2*n4^2-592*d^3+330*
| n3*d^2*n5^2+520*n4*n2^2+496*n1*n4*n2*n3-204*n5*n4^2*d-672*d^3*n2-59*d^3*n1^2+48
| *n3^2*n1*n5^2+224*n2^2*n4*d^2+240*n1*n5*n2^2*n4-52*n1*n3^2*n4*d+32*n1*n3^2*n4*
| n5+16*n1*n3*n4^2*n5-1192*n2*d*n4+184*n1^2*n4+120*n1*n4^2+72*n1^3-540*d*n5^2*n2*
| n1-255*n3*d^3*n2+264*n3*n2^3-16*n1^3*n3*d+318*n3*d^2*n2^2+264*n3*n5*n4*d^2+294*
| n3*n2*n4*d^2-148*n2*n1^2*n4*d+120*n2*n1^2*n4*n5+24*n2*n3^3*n4+8*n3*n2*n4^3+4*d^
| 2*n4^3+32*n1*n2^4+8*n2*n3^4+64*n5^4*n2+176*n3*n2*n5^3-193*d^3*n5^2-56*n2^4*d+72
| *n3^2*n4*n2^2-20*n3^3*n4*d+16*n3^3*n4*n5+72*n5*n2^2*n4^2+120*n5*n2^3*n4-80*d*n2
| ^2*n4^2-124*d*n2^3*n4+62*n5*n4^2*d^2+82*n2*n4^2*d^2+8*n5*n2*n4^3+128*n3^3*n5+16
| *n2*n4^3-596*n3*n5*d*n2^2-4*d*n3*n4^3+8*n1*n2*n4^3+16*n3^4+48*n1*n5^3*n3-259*n5
| *n3*d^3+256*n1*n2^2*n5^2+48*n1^3*n2*n5+24*n2^3*n4^2+78*n3^2*n4*d^2-168*n1*n2^3*
| d-60*n5*n3*n4^2*d+72*n1^2*n2^2*n4+8*n1^2*n4^2*n5-16*n1^2*n4^2*d+46*d^4*n4+8*n5^
| 3*n4^2-1288*n3*n2*n1*d+864*n1*n5^2*n2-2244*n3*d*n2*n5+160*n3*n5*n2^3+96*n1*n3^2
| *n2^2-64*n1^3*n2*d+176*n1*n2*n3^2*n5-208*n1*n2*n3^2*d-24*n3^3*d*n1+120*n3*n4^2+
| 786*n2*n4*d^2+96*n1^2*n3*n2^2+636*n1*n2*n5*d^2+232*n3^2*n4+528*n5^2*n4+160*n5*
| n4^2-696*n3*n5*d*n1*n2+212*n5*d^2*n3^2+152*n1^2*n4*n5-216*n1^2*n4*d+176*n5^3*n4
| +240*n1^2*n2*n4-12*n4^3*d+168*n3^2*n5*n2^2+120*n2^2*n4^2+312*n5^2*n3^2+736*n3*
| n5*n4+736*n3*n2*n4-1200*n5*d*n4-452*d*n2^3-104*n3*n4*d^3-160*n5*n4*d^3-170*n2*
| n4*d^3+398*n3^2*d^2+212*n3^2*d^2*n2+160*n1*n2^3*n5+518*n5*n2^2*d^2+168*n5^2*n2*
| n3^2+120*n5^2*n2*n1^2+462*n5*n2*n4*d^2-72*n3^3*d*n5+208*n1*n5^3+264*n1*n2^3+48*
| n1^3*n5+32*n1*n2*n3^3+104*n5^4+1136*n1*n3*n2*n5+368*n3*n5^2*n4+292*d^2*n1^2+72*
| n3*n2^3*n4+56*n2*n5^2*n4^2+112*n2*n5^3*n4+8*n5*n1^2*n3^2+304*n5^3*n3-384*d*n5*
| n2*n3^2+96*n1*n2^3*n3+192*n5^2*n2^2*n4+32*n1*n4*n5^3+88*n4^2+40*d^2*n3^3+194*d^
| 4-72*n3^3*n2*d-2012*n5*n2*n1*d+144*n1^2*n5^2+8*n5*n4^3+848*n3*n5*n4*n2-892*n3*
| n5*n4*d+656*n1*n5*n4+416*n1*n4*n3-408*n1*d^3-84*d*n1^3+136*n2*n3^2*n4*n5+16*n1^
| 2*n3*n4*n5+72*n1^2*n3*n4*n2-44*n1^2*n3*n4*d+112*n5*d^4+104*n1*n4*n3^2+408*n1*n4
| *n2^2+1124*n2*n1*d^2+496*n5^3*n2-208*n3*d*n5^2*n4+224*n2*n3*n4*n5^2-60*n1*n5*n4
| ^2*d-96*n1*n2*n4^2*d-168*n1*d*n5^2*n4-32*n1*n3*n4^2*d-16*n3^2*n4^2*d+16*n3*n5^2
| *n4^2+8*n2^5+120*n3^3+416*n5^3+146*n2^3*d^2-12*d*n2*n4^3-144*n3*n4^2*d+648*n5*
| n2^2*n4+216*n5*n2*n4^2+192*n5*n3*n1^2+272*n1^2*n2^2+40*n3^3*n4+32*n3^2*n4^2+48*
| n1*n3^3+24*n1^3*n4+56*n1^2*n3^2-352*n1*n3*d*n2^2+400*n1*n3*d^2*n2+24*n1^3*d^2-
| 100*n1^2*n5*d*n3-148*n1*n5*d*n3^2+16*n1^2*n4*n5^2-12*n1^3*n4*d+24*n1^3*n4*n2-4*
| n1^4*d+640*n5^2*n4*n2-656*n5^2*n4*d+704*n1*n2*n4+152*n1^2*n2^2*n5+109*n2*d^4-60
| *d*n5^4+80*n3*n2*n5*n4^2+48*n3*n2^2*n4^2+48*n3*n5^3*n4+32*n2*n1^3*n3+48*n2*n1^2
| *n3^2-176*n3*n5^3*d+82*n1^2*d^2*n3+64*n1*n5^2*n3*n4-208*n1*n5*n3*n4*d+72*n1*n2^
| 3*n4+48*n1*n2^2*n4^2+144*n1*n2^2*n3*n4-128*n5*n3^2*n4*d+80*n5*n1*n4^2*n2-420*d*
| n5*n2^2*n4-260*d*n3*n4*n2^2+240*n3*n5*n2^2*n4-96*n3*n2*n4^2*d+62*n1^2*n4*d^2-96
| *n1*d^3*n4+140*n1*n3*n4*d^2+232*n1*n5*n4*d^2+286*n1*n2*n4*d^2+24*n3^2*n2*n4^2-
| 524*n5*n2*n3*n4*d-156*d*n2*n3^2*n4+144*n5^3*n2^2+32*n3^3*n2^2+320*n1*n2^2*n5*n3
| -572*n1*n2^2*n5*d-28*n3^2*d*n1^2-180*n3^2*d*n2^2+8*n1^2*n5^3+42*n3*n4^2*d^2+16*
| n1*n5^4+48*n1^2*n2^3+144*n5^3*n2*n1+542*n5^2*n2*d^2+344*n2^3+88*n2^4+32*n3*n2^4
| -76*n1^2*n5^2*d-116*n1*n5^3*d+250*n1*n5^2*d^2+128*n1^2*d^2*n5+48*n3^2*n5^3+32*
| n3^3*n5^2-403*n2*d^3*n5+272*n5^2*n2^2*n3-480*n5^2*n2^2*d+188*n2*n1^2*d^2)
""".stripMargin)
val c11 = ring(
"""
| (32*
| n1+32*n2+32*n5-16*d+8*n5^2*n2^3+16*n4*n2+d^4*n3-36*n1*n5*d*n3+16*n1*d^2*n3-68*
| n1*n5^2*d+72*n1*d^2*n5-13*n1*d^3*n5-44*n5^3*d+8*n2*n1^2*n3-12*n5*n2^3*d+68*d^2*
| n5^2-72*n1*d+80*n1*n5+16*n1*n4+64*n1*n2+16*n1^2+16*n1*n3-8*n3*d+16*n3*n5+16*n3*
| n2-96*n5*d+64*n5^2+16*n5*n4+112*n5*n2-88*n2*d-6*n3*d^3+48*n1*n2^2*n5+16*n1*n3*
| n2^2+16*n5^2*n2*n1*n3-24*n5^2*n2*d*n3-28*d*n2^2*n4+24*n5*d^2*n4-16*n2*n1^2*d-8*
| n4*d+72*n5^2*n2^2-36*n1*n5*n4*d+16*n1*n5^2*n4+48*n1*n5*n4*n2-32*n1*n2^2*d+32*d^
| 2-64*d*n5*n4*n2-12*n2*n1^2*d*n5-212*d*n5*n2-104*n1*n2*d+24*n1^2*n5-24*n1^2*d+24
| *n3*n2^2-36*n3*n2*d+32*n1*n2^2+84*n2*d^2+96*n5*d^2+44*n2^2*d^2+104*n5*n2^2+128*
| n5^2*n2-116*n5^2*d-28*n1*n3*d+32*n1*n3*n5-80*d*n2^2+64*n1*n5^2+128*n1*n5*n2+8*
| n1^2*n3-132*n1*n5*d+24*n3*n5^2+16*n1*n5^2*n3+48*n2^2+16*n1^2*n2+48*n3*n5*n2-36*
| n3*n5*d+12*n3*d^2+32*n1*n2*n3+60*n1*d^2-4*d*n1^2*n4*n5-24*n5*d*n1^2+3*n1*d^4+24
| *n5*n2^3+48*n5*n2*n4-28*n1*d*n4-8*n1*n2^2*n4*d-116*n5*n2^2*d-10*n2*d^3*n1-28*n1
| *n2*n5*n4*d-36*n1*n2*n4*d+8*n2*n1^2*n3*n5-4*n2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2*n5^2+32*n1*n5
| *n4-22*n1*d^3+6*n5*d^4+16*n1*n4*n2^2+56*n2*n1*d^2+56*n5^3*n2-8*n1*d*n5^2*n4+40*
| n5^3+4*n2^3*d^2+40*n5*n2^2*n4+8*n5*n3*n1^2-8*n1*n3*d*n2^2+10*n1*n3*d^2*n2-4*n1^
| 2*n5*d*n3+40*n5^2*n4*n2-28*n5^2*n4*d+32*n1*n2*n4+5*n2*d^4-4*d*n5^4-4*n3*n5^3*d+
| 2*n1^2*d^2*n3-24*d*n5*n2^2*n4+2*n1^2*n4*d^2-3*n1*d^3*n4+10*n1*n5*n4*d^2+10*n1*
| n2*n4*d^2+16*n5^3*n2^2+16*n1*n2^2*n5*n3-24*n1*n2^2*n5*d+16*n5^3*n2*n1+44*n5^2*
| n2*d^2+16*n2^3-4*n1^2*n5^2*d-8*n1*n5^3*d+18*n1*n5^2*d^2+6*n1^2*d^2*n5-25*n2*d^3
| *n5+16*n5^2*n2^2*n3-40*n5^2*n2^2*d+4*n2*n1^2*d^2)
""".stripMargin)
val e1 = ring(
"""
| (768+48*n1^4*n2*n3-72*d^3*n4^3+1344*n1+2112*n2+1728*n3+1728*n4+2304*n5-2944*
| d-272*d*n5^2*n2^3+275*n2^2*d^4-512*d*n5^2*n2*n1^2+340*d^2*n2^3*n4+48*n1^3*n2*n3
| ^2+512*n5^2*n2^3+48*n1^3*n2*n4^2+32*n1*n5^4*n2+16*n3*n2^4*n5+4000*n4*n2+768*n1*
| n3*n5*n2^2*n4+1125*d^4*n3-48*n1*n5^3*n3^2-120*n1*n2^4*d+48*n1*n3^2*n2^3-1096*n1
| *n2^2*n5*d*n3+416*n1*n3^2*d^2*n2+64*n3^2*n2^2*n5^2+32*n1^4*n5+3008*n3^2*n4*n5+
| 2944*n3^2*n4*n2-8*n1^5*d+620*d^2*n5^3*n4+144*n1^2*n2^3*n3+24*n5^4*d*n1-4000*n3^
| 2*n4*d-5560*n1*n5*d*n3+4320*n1*d^2*n3-3608*n1*n5^2*d+6012*n1*d^2*n5+256*n1*n4^3
| -2330*n1*d^3*n5-2432*n5^3*d+40*n3^2*d*n1^2*n5-48*n3*n2^4*d+1536*n2*n1^2*n3+1824
| *n1*n2*n4^2+1248*n1*n2*n3^2-1536*n5*n2^3*d+2912*n4^2*d^2-48*n1^2*n5^4-320*d*n1^
| 3*n2^2+5576*d^2*n5^2+64*n3*n5^2*n4^3-784*n3^3*d+496*n1^3*n2^2+160*n5*n2^4+876*
| n1*n4*n5^2*d^2+160*n1*n4*n3*n5^3-16*n1^4*n5*d+7456*n3*d^2*n4-4064*n1*d+2912*n1*
| n5+2464*n1*n4+2944*n1*n2+768*n1^2+2144*n1*n3-5312*n3*d+4000*n3*n5+3456*n3*n4+
| 3680*n3*n2+1376*n3^2-7136*n5*d+2624*n5^2+4256*n5*n4+5088*n5*n2-6560*n2*d+128*n2
| ^4*n4+16*n1^2*n2*n4^3-48*n1^3*n3*n4*d-64*n1^3*n5^2-3824*n3*d^3+712*n3^2*n5*d^2*
| n2+416*n1^2*n5*n2^2*n4+240*n1*n3*n2^2*n4^2+3408*n1*n2^2*n5+2240*n1*n3*n2^2+192*
| n3*n5^3*n4^2+160*n2^2*n4^3+1472*n5^2*n2*n1*n3-4368*n5^2*n2*d*n3+432*n2^2*n4^2*d
| ^2-48*n1^3*n5^3-184*n5*d^5-1840*n1^2*n2^2*d-268*n1*n4^2*d^3-5744*d*n2^2*n4-4352
| *d*n2*n4^2+140*n5*n4^3*d^2-128*n1*d*n5*n4^3+9548*n5*d^2*n4-3312*n2*n1^2*d+1904*
| n1*n5*n4^2+64*n3^3*n4^2*n5-1630*n5*n2*n4*d^3-5440*n4*d+160*n1^3*n2*n3*n5+48*n1^
| 3*n4^2+48*n1^2*n4^3+2576*n5^2*n2^2-16*d*n1*n3^2*n5^2-16*n1^4*n5^2+224*n1*n2^3*
| n5*n3+32*n3^2*n5*n4^3+32*n1^4*n3-104*n4^3*n5^2*d+208*n5^2*n2^3*n4-7768*n1*n5*n4
| *d+2720*n1*n5^2*n4+6048*n1*n5*n4*n2-4592*n1*n2^2*d+4624*d^2-352*n5^3*n2^2*d-
| 13992*d*n5*n4*n2-1192*d*n4*n5^2*n2^2-944*d*n4*n5^3*n2-16*d*n3*n4^4-680*n5*n2^2*
| n4^2*d+672*n1^2*n2*n4*d^2-128*n3*n1^2*n5^2+80*n3*n5^2*n2^3-80*n3^2*n5^2*n1^2+16
| *n1*n2^2*n3^3-80*n1^3*n5^2*n3-490*n2*n4^2*d^3-2864*n2*n1^2*d*n5-360*n1*d*n5^3*
| n4+299*n1*d^4*n4-936*n1^2*n2*n5*n4*d-64*d*n3^2*n4^3+314*n5^2*d^4+96*n1*n3*n2*n4
| ^3+168*n4^2*d^4+904*d^2*n5*n2*n1^2+384*n1^2*n2^2*n3*n5-624*d*n3*n2^2*n4^2+32*n3
| ^4*n5-112*n3^3*n2*d*n5-12360*d*n5*n2-7200*n1*n2*d+2224*n3^2*n5+1104*n1^2*n5-
| 1872*n1^2*d-264*n1^2*n2*n4^2*d+392*n1*n3^2*n4*d^2-80*n1*n3^3*n4*d+2064*n3^2*n2-
| 3208*n3^2*d+2816*n3*n2^2-8824*n3*n2*d+2480*n1*n2^2+1040*n1*n3^2+8052*n2*d^2+
| 8712*n5*d^2-80*n1^2*n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+4728*n2^2*d^2+521
| *n2*n4*d^4+496*n5*n2^2*n3*n4^2+1412*n1*n4^2*d^2+96*n3*n2^2*n4^3-260*d^3*n5^3+
| 4048*n5*n2^2+4512*n5^2*n2-6288*n5^2*d-4984*n1*n3*d+3328*n1*n3*n5-5264*d*n2^2+
| 2144*n1*n5^2+5280*n1*n5*n2+832*n1^2*n3-6856*n1*n5*d+3296*n3*n5^2-224*d*n5*n2*n4
| ^3+428*n1*n3*n4^2*d^2-80*d*n2^2*n4^3+48*n5*n2^2*n4^3+80*n1*n2^4*n5+352*n1*n4*n5
| ^3*n2+1440*n1*n5^2*n3+304*n5^3*n2^2*n4+1500*n1*n3*n5*d^2*n2+192*d^2*n3^3*n4+
| 2176*n2^2+356*n1*n3*n5^2*d^2+624*n2*n3*n5^2*n4^2+1712*n1^2*n2+6528*n3*n5*n2-
| 9496*n3*n5*d+6420*n3*d^2+3648*n1*n2*n3+4884*n1*d^2+592*n1^2*n2^2*d^2-1424*d*n1^
| 2*n4*n5+80*n1^3*n4*n5+448*n1^2*n4^2*n2+320*n1*n3^2*n4^2+160*n1*n3^3*n4+160*n1*
| n3*n4^3+864*n3^2*n4^2*n5+384*n5^4*n4-844*n5^2*n4*d^3+192*n1*n2*n3^2*n4^2-764*n1
| *n2*d^3*n3-336*n1*n2^3*d*n3+192*n2^2*n3^2*n4^2-1216*n5^2*d*n3^2-1144*n1*n2*d^3*
| n5-544*n1*n2^3*d*n5+808*n1*n2^2*d^2*n3-480*n5*n3^2*d*n4^2+2880*n3*n5*n4^2+1408*
| n1*n3*n4^2-1936*n5*d*n1^2+869*n1*d^4+2320*n5*n3^2*n2+1360*n5*n2^3+16*n1*n2^2*n4
| ^3+176*n5^2*n2^3*n1+32*n2*n3*n4^4-16*n2*n4^4*d-80*n3^3*n4^2*d+7744*n5*n2*n4-
| 5896*n1*d*n4-3128*n1*n2^2*n4*d-488*d*n5*n4^3-5152*n1*n2*n3*n4*d+1328*n1*n2*n3*
| n4^2+1232*n1*n2*n3^2*n4-8352*n3*d*n4-131*n3*d^5-7184*n5*n2^2*d-2676*n2*d^3*n1-
| 76*n3^3*d^3+128*n5^3*d^2*n1-7152*n1*n2*n5*n4*d-7824*n1*n2*n4*d+48*n5*n2^4*n4-16
| *n5*n3^4*d+16*n2*n5^5-384*n1*n2*d*n5^3+1184*n2*n1^2*n3*n5-1928*n2*n1^2*n3*d+144
| *n1^2*n2*n3*n4^2-384*n3^2*d^3*n5+448*n1^2*n2*n3*n4*n5+224*n2*n3*n5*n4^3+96*n2*
| n3^3*n4^2-4928*n3*n2^2*d+96*n3^3*n4*n2^2+96*n3^2*n4*n2^3+7848*n3*d^2*n2+320*n1*
| n3*n2^2*n5^2+8332*n3*d^2*n5-544*n1^2*n3*n2^2*d+3872*n3*n5^2*n2-5624*n3*n5^2*d+
| 96*n1^2*n5^3*d+48*n1*n3^3*n5+64*n1^2*n5^2*n4^2-1448*n1*n5^2*d*n3+3072*n1*n5*d^2
| *n3+16*n1*n3*n5^3*d+96*n2*n3^2*n4^3+2624*n1*n5^2*n2*n4-2120*d*n5^3*n4-2000*n5^2
| *n4^2*d-6408*n2*n5^2*n4*d-420*n3*n4^2*d^3-8008*d*n5^2*n2+64*d^2*n5^2*n1^2+448*
| n1^2*n4^2-112*n1*n4^3*n2*d+272*n2^2*n5^2*n4^2+224*n3^3*n2*n5+6604*n3*n5*d^2*n2+
| 3552*n5*n3*n2^2+48*n1*n2^3*n4^2-5248*n5*d^3+32*n5^5+4128*n1*n4*n3*n5+2256*n1^2*
| n2*n5-5696*n1*n3*n4*d+928*n1^2*n3*n4-224*n4*n1^2*d^3+176*n3^2*n2^3-112*n1^2*n5^
| 3*n3+324*n3^2*n5^2*d^2+11132*n5*d^2*n2-422*d^5+128*n3*n5^4+132*n3^3*n5*d^2+32*
| n1^2*n5*n4^3-24*d*n1^2*n4^3-3752*n5*n3^2*d-1000*n3*n2^3*d-3568*d*n3^2*n2-16*n3*
| n1^4*d+144*n1^2*n2*n3^2*n4+448*n3^3*n2+16*n5^2*n2^4-10848*n3*n2*n4*d+3040*n3*n2
| *n4^2+3488*n3*n2^2*n4-1870*n2^2*d^3+848*n1*n5^2*n4^2+224*n1*n5*n4^3-280*d*n1*n4
| ^3+3904*n1*n2*n3*n4*n5+4308*n5^2*n4*d^2+1296*n3^2*n4*n5^2-2056*d*n5^3*n2+1056*
| n3^2*n2^2+96*n1^4+1296*n1*n3*n5*n4*d^2-648*n2^2*n4*d^3+152*n4^3*n3*d^2-202*n2^3
| *d^3-3224*n4^2*d+6740*n4*d^2+16*n1^5*n2+304*n1*n5*n2^2*n4^2-984*n1*n5*n2*n4^2*d
| +76*n1*d^2*n4^3+2448*n2*n4^2+324*n3*n5^3*d^2+944*n1*n5*n3^2-1456*n3*d*n1^2-2464
| *n1*n4^2*d-704*d*n3*n5^3*n4-1150*n4^2*d^3-544*n3*n2^2*d^3-1050*n3^2*d^3-147*n4*
| d^5-3928*n5*n2*n4^2*d+5240*n1*d^2*n4-256*n1^3*d*n5+384*n4^3+936*n1*d^2*n3^2-
| 1656*n1*d^3*n3-600*d*n3^2*n4*n2^2+2828*n1*n2^2*d^2+107*n1^2*d^4+84*n1^3*n4*d^2+
| 192*n4*n5^3*n3^2+1384*n5^3*d^2+1088*n4*n2^3-16*n5*n1^2*n3^3-8*n2^5*d-104*n3*n4^
| 2*n1^2*d+544*n2*n3*n5^3*n4+1140*n2*n5*n4^2*d^2+276*n3*n2^3*d^2-64*n1*n2*n3^3*d-
| 1712*n1*n3^2*d-4112*d^3*n4+512*n3*n4^3+192*n3*n1^3+128*n1*n5^3*n4^2+64*n1*n5^2*
| n4^3+928*n1*n2^2*n4*d^2+144*n1^3*n2^2*n4-64*n3^4*d+192*n1^4*n2-614*n1*n3*n4*d^3
| +96*n1*n5*n2*n4^3+736*n1^3*n2+1680*n5^2*n4^2+192*n1*n3*n2^3*n4-3816*d^3+3164*n3
| *d^2*n5^2-192*n5*n3*n4^3*d+288*n3*n5*n2^3*n4+3232*n4*n2^2+4416*n1*n4*n2*n3-4376
| *n5*n4^2*d-4888*d^3*n2-702*d^3*n1^2+96*n3^2*n1*n5^2+1496*n1*n3*n2*n4*d^2-560*n1
| ^2*n2^2*n4*d-1528*n1*n4*d*n5^2*n2-578*n1*n2^2*d^3-272*d*n4*n1^3*n2+284*n1^2*n3*
| n4*d^2-74*n1^3*d^3+237*n3*d^4*n1+3360*n2^2*n4*d^2+2464*n1*n5*n2^2*n4+168*d^2*n2
| *n4^3-1440*n1*n3^2*n4*d+1008*n1*n3^2*n4*n5+1184*n1*n3*n4^2*n5-9800*n2*d*n4+1120
| *n1^2*n4+1424*n1*n4^2+272*n1^3-312*d*n5^3*n4^2-3696*d*n5^2*n2*n1-3072*n3*d^3*n2
| +896*n3*n2^3+16*n1^2*n3^3*n2-88*d*n3^2*n5^3-16*n1*n5^5-232*n1^3*n3*d+2848*n3*d^
| 2*n2^2+6680*n3*n5*n4*d^2+6348*n3*n2*n4*d^2-2200*n2*n1^2*n4*d+1568*n2*n1^2*n4*n5
| +544*n2*n3^3*n4+544*n3*n2*n4^3+32*n1^4*n4+384*d^2*n4^3+192*n1*n2^4+8*n4^4*d^2-
| 220*n1^2*d^3*n5+32*n2*n3^4+32*n5*n3^2*n2^3+304*n5^4*n2-488*n1*n5^2*n4^2*d+848*
| n3*n2*n5^3-304*n5*d*n3^3*n4-88*n3^2*n2^3*d-2172*d^3*n5^2-248*n2^4*d-32*n1^3*n3*
| n4*n5+1072*n3^2*n4*n2^2-704*n3^3*n4*d+544*n3^3*n4*n5+1216*n5*n2^2*n4^2+976*n5*
| n2^3*n4-1552*d*n2^2*n4^2-1224*d*n2^3*n4+2600*n5*n4^2*d^2+2544*n2*n4^2*d^2+400*
| n5*n2*n4^3+480*n3^3*n5+544*n2*n4^3-4016*n3*n5*d*n2^2+160*n1^2*n2*n3*n5^2-824*n3
| *n5^2*d*n1*n2+563*n5*n4*d^4-560*d*n3*n4^3+208*n1*n2*n4^3+208*n5*n4^2*n1^2*n2-
| 200*n5*n4^2*n1^2*d-544*n1*n5*n3^2*n4*d+64*n3^4+48*n1^3*n5^2*d+80*n3^2*n2*n1^2*
| n5+48*n1*n5^3*n3-672*n1^2*n2*n3*n4*d-3210*n5*n3*d^3-160*n1*n3^2*n4^2*d+140*n1^2
| *n4^2*d^2+64*n2*n1^2*n5^3+1392*n1*n2^2*n5^2-16*n3^4*n2*d-24*d*n1^3*n4*n5+32*n2*
| n3^2*n5^3+96*n3*n2^3*n4^2-16*n1^4*n5*n3+640*n1^3*n2*n5+240*n2^3*n4^2+2288*n3^2*
| n4*d^2-1232*n1*n2^3*d-3320*n5*n3*n4^2*d+316*n1^3*n2*d^2-170*n1*d^3*n3^2+56*n1^2
| *d^2*n3^2-8*n1^3*n3^2*d+896*n1^2*n2^2*n4+368*n1^2*n4^2*n5-504*n1^2*n4^2*d+32*n3
| *n4^4+1237*d^4*n4+528*n5^3*n4^2+176*n5^2*n4^3+160*n3^3*n4^2+64*n3^4*n4+128*n3^2
| *n4^3-6512*n3*n2*n1*d+3136*n1*n5^2*n2-11432*n3*d*n2*n5+656*n3*n5*n2^3+480*n1*n3
| ^2*n2^2-976*n1^3*n2*d-264*n5*n4*n1^2*n3*d+288*n5*n4*n1*n2^3+428*d^2*n5*n2^3-175
| *n2*d^5-812*d^3*n5*n2^2+768*n1*n2*n3^2*n5-1440*n1*n2*n3^2*d-160*n3^3*d*n1+2208*
| n3*n4^2+8880*n2*n4*d^2+864*n1^2*n3*n2^2+5728*n1*n2*n5*d^2+132*n3^3*n2*d^2-103*
| n1*d^5+48*n1*n5^4*n4+320*n3^2*n4^2*d^2+380*n1*n2^3*d^2-576*n2*n3^2*n4^2*d+2304*
| n3^2*n4+4000*n5^2*n4+2416*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-5168*n3*n5*d*
| n1*n2+2088*n5*d^2*n3^2+1280*n1^2*n4*n5-1984*n1^2*n4*d+1792*n5^3*n4+1792*n1^2*n2
| *n4-672*n4^3*d+688*n3^2*n5*n2^2-2240*n1*n3*d*n5*n2*n4-864*n1*n5*n4*d^3-920*n1*
| n2*n4*d^3-508*n5*n4^2*d^3-1568*n2*n3*n5*n4^2*d+1376*n2^2*n4^2-80*n1*d*n3*n4^3+
| 1136*n5^2*n3^2+6432*n3*n5*n4+6112*n3*n2*n4-10488*n5*d*n4-1824*d*n2^3+224*n2*n3^
| 3*n4*n5-2920*n3*n4*d^3-3810*n5*n4*d^3-3532*n2*n4*d^3+649*n2*d^4*n5-536*d*n5*n2^
| 3*n4+32*n4^3*n5^3+2768*n3^2*d^2-1456*n3^2*d*n5*n2*n4+148*n3^2*d^4-1448*n1*d*n5*
| n2^2*n4+160*n2*n1^3*n4*n5-200*n2*n1^2*d*n3^2+2036*n3^2*d^2*n2+896*n1*n2^3*n5+
| 4204*n5*n2^2*d^2+688*n5^2*n2*n3^2+816*n5^2*n2*n1^2+8320*n5*n2*n4*d^2-504*n3^3*d
| *n5+544*n1*n5^3+992*n1*n2^3+208*n1^3*n5+112*n1*n2*n3^3+352*n5^4+16*n1^3*n3^2+
| 4448*n1*n3*n2*n5+4288*n3*n5^2*n4+1720*d^2*n1^2-840*n1*n3*d*n5^2*n4+704*n3*n2^3*
| n4+1536*n2*n5^2*n4^2+1616*n2*n5^3*n4-32*n5*n1^2*n3^2+112*n1^3*n5^2*n2+1120*n5^3
| *n3-2584*d*n5*n2*n3^2+560*n1*n2^3*n3+1536*d^2*n5*n2^2*n4+352*n3*n5*n4^3+2080*n5
| ^2*n2^2*n4+656*n1*n4*n5^3+1312*n4^2+588*n5^2*n4^2*d^2+160*n1^2*n5*d^2*n3-416*n1
| ^3*n2*d*n5+128*n1^3*n3*n4*n2+424*d^2*n3^3+448*n3^2*n5*n2^2*n4-280*n1*n2^2*d*n3^
| 2-456*d*n5^3*n2*n3+64*n4^2*n5^4+1748*d^4-424*n1*n2*d*n5*n3^2+176*n1*n4*n3^2*n5^
| 2-304*d*n2*n3^3*n4+1000*n2*n3*n4^2*d^2-360*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5^2-
| 728*n1^2*n5*d*n3*n2+236*n1*n5*d^2*n3^2+160*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+64*
| n1*n3*n5*n4^3+544*n1*n5^2*n2^2*n4-488*n3^3*n2*d-48*n1*n5^4*n3-9536*n5*n2*n1*d+
| 304*n1^2*n5^2+416*n5*n4^3+42*d^6+2848*n2*n3*n5*n4*d^2+68*d^2*n2^4+32*n2*n4^4-
| 450*n2*d^3*n1^2-224*d*n4*n5^4+96*n1^3*n2^3+256*n1*n3*n5^2*n4^2+32*n3*n2^4*n4+
| 8480*n3*n5*n4*n2-11424*n3*n5*n4*d+128*n3*n5^4*n4+1088*n1*n5^2*n2*d^2+112*n3*n5^
| 3*n2^2+4416*n1*n5*n4+3296*n1*n4*n3-2920*n1*d^3-544*d*n1^3-728*n5^2*n3*n4^2*d+96
| *n1*n2*n3^3*n4+80*n2*n5*n1^4+948*n5*n3*n4^2*d^2+208*n1^2*n3*n4^2+2560*n2*n3^2*
| n4*n5+544*n1^2*n3*n4*n5+1120*n1^2*n3*n4*n2-1032*n1^2*n3*n4*d+1140*n3*n2^2*n4*d^
| 2-384*n3^2*d^3*n2+40*n1*d^2*n3^3+1562*n5*d^4+128*n5^2*n3^3*n4+1312*n1*n4*n3^2+
| 2624*n1*n4*n2^2+6592*n2*n1*d^2+68*n1^3*d^2*n3+1792*n5^3*n2-4992*n3*d*n5^2*n4+
| 3776*n2*n3*n4*n5^2-2184*n1*n5*n4^2*d-2112*n1*n2*n4^2*d-3104*n1*d*n5^2*n4-1560*
| n1*n3*n4^2*d-1168*n3^2*n4^2*d+1264*n3*n5^2*n4^2-906*d^3*n5^2*n2+16*n2^5+480*n3^
| 3+1408*n5^3+1056*n2^3*d^2-608*d*n2*n4^3-864*n1^2*n2^2*n5*d+447*n3*d^4*n2+1124*
| n3*n5*n2^2*d^2-896*n2*n5^2*n4^2*d+840*n5^2*n2^2*d^2-1260*d^3*n5*n2*n3-344*d*n5*
| n2^3*n3+600*n1^2*d^2*n3*n2-3856*n3*n4^2*d+4576*n5*n2^2*n4+3344*n5*n2*n4^2+640*
| n5*n3*n1^2+1408*n1^2*n2^2-370*d^3*n5^2*n1+640*n3^3*n4+1056*n3^2*n4^2+160*n1*n3^
| 3+256*n1^3*n4+192*n1^2*n3^2-2696*n1*n3*d*n2^2+3868*n1*n3*d^2*n2+352*n1^3*d^2-
| 1226*n3*n2*n4*d^3-648*n1^2*n5*d*n3-952*n1*n5*d*n3^2+16*n1^5+320*n1^2*n4*n5^2+96
| *n1^3*n4*n3-296*n1^3*n4*d+432*n1^3*n4*n2+388*n1^2*n5*n4*d^2-144*d*n1^2*n4*n5^2-
| 120*n1^4*d+176*n2*n5^4*n4-368*n1*d*n2^3*n4-360*n1*d*n2^2*n4^2-1768*n3*d*n5*n2^2
| *n4-56*n3^3*n2^2*d-64*d*n2^4*n4+5408*n5^2*n4*n2-7240*n5^2*n4*d-24*n1^3*n4^2*d-
| 320*d*n1^2*n2^3+4352*n1*n2*n4-304*n3*d*n2*n4^3+1440*n5^2*n3*n4*d^2+1344*n1^2*n2
| ^2*n5+96*n1*n5^3*n3*n2+240*n2*n5^3*n4^2+80*n2*n5^2*n4^3+672*n2^2*n3*n4*n5^2+
| 1469*n2*d^4-384*d*n5^4+2736*n3*n2*n5*n4^2+1120*n3*n2^2*n4^2+1216*n3*n5^3*n4+432
| *n2*n1^3*n3+320*n2*n1^2*n3^2-1208*n3*n5^3*d+144*n1^3*n2^2*n3-384*d*n3*n4*n2^3+
| 32*n4^4-168*d*n5^4*n2+240*n1^2*n5*n2^3+48*n2^2*n5^4+64*n1^2*n3*n4^2*n5+848*n1^2
| *d^2*n3+584*n5^3*n2*d^2+406*n1*n2*d^4-832*n5^2*n2^2*n1*d-688*n5^2*n2^2*d*n3+36*
| n1^4*d^2+1536*n1*n5^2*n3*n4-4648*n1*n5*n3*n4*d-2168*n2*n3*d*n5^2*n4-588*n3*n5^2
| *d^3-164*n3*d^3*n1^2+1876*n4*d^2*n5^2*n2+337*n1*d^4*n5+980*n5*n4*n3^2*d^2+448*
| n3^2*n2*n5*n4^2+624*n1*n2^3*n4+640*n1*n2^2*n4^2+1728*n1*n2^2*n3*n4-3448*n5*n3^2
| *n4*d+1696*n5*n1*n4^2*n2-5336*d*n5*n2^2*n4-4008*d*n3*n4*n2^2+3136*n3*n5*n2^2*n4
| -3504*n3*n2*n4^2*d+1160*n1^2*n4*d^2-2052*n1*d^3*n4+3252*n1*n3*n4*d^2+4508*n1*n5
| *n4*d^2+4660*n1*n2*n4*d^2-32*n4^4*d+1024*n3^2*n2*n4^2-9880*n5*n2*n3*n4*d-3384*d
| *n2*n3^2*n4-562*n3*d^3*n1*n5+424*n3*n4*d^4+160*n1^2*n3^2*n4-704*n1*n2*n3^2*n4*d
| +512*n1*n2*n3^2*n4*n5-1008*n1*d*n3*n4*n2^2+640*n5^3*n2^2+128*n1*n3^2*n4^2*n5+
| 624*n1*n5*n4^2*d^2+608*n1*n2*n4^2*d^2-744*n5^2*n3^2*n4*d-656*n1*n3*n5*n4^2*d-48
| *n1^3*n4*n5^2+112*n3^3*n2^2+1856*n1*n2^2*n5*n3-4144*n1*n2^2*n5*d+16*d^2*n3^4+24
| *n1^3*n3*n5*d+48*n5^3*n2^3+144*n1^2*n2^3*n4+48*n1*n2^4*n4-432*n4*d^3*n3^2+96*n1
| ^2*n2^2*n4^2+544*n2*n4*n3^2*n5^2-752*n1*n3*n2*n4^2*d+48*n1*n5^2*n3^2*n2-16*n1*
| n5^2*n3^3+608*n1*n3*n2*n5*n4^2+1220*n3*n5^2*d^2*n2+64*n1^2*n2^4-208*n3^2*d*n1^2
| -1176*n3^2*d*n2^2-128*n1^2*n5^3+2216*n3*n4^2*d^2+1256*d^2*n5*n2^2*n1+2100*n5*n1
| *n4*n2*d^2-16*n4*n1^2*n5^3-16*n1*n5*n3^3*d-16*n1*n5^4+288*n1^2*n3*n4*n2^2+496*
| n1^2*n2^3+16*n1*n2^5+964*n3^2*n2*n4*d^2+48*n1*n2^4*n3-80*d*n5*n2^4+240*n1^3*n2^
| 2*n5-360*d*n5^2*n2*n3^2+64*n1*n3^3*n4*n5-56*n5^2*n3^3*d+672*n5^3*n2*n1+32*n2*n3
| ^4*n4-16*n1^4*n4*d+48*n1^4*n4*n2-16*n1^4*n4*n5-32*n3^4*n4*d+32*n3^4*n4*n5-16*n5
| *n1^3*n3-120*n1^4*n2*d+800*n1*n4*n3*n5^2*n2-272*n2*n1^3*n3*d-1288*n5*n3*n4*d^3+
| 288*n5^2*n2^2*n1^2+4688*n5^2*n2*d^2+1040*n2^3+224*n2^4+324*n3^2*n2^2*d^2-32*n3^
| 2*n5*n1^3+459*n3*d^4*n5+144*n5*n1*n3^2*n2^2+76*n1^3*d^2*n5+96*n2^2*n1^2*n3^2+96
| *n3*n2^4-288*n1^2*n5^2*d-536*n1*n5^3*d+2008*n1*n5^2*d^2+1132*n1^2*d^2*n5+64*n1^
| 4*n2^2-16*n5^5*d+176*n3^2*n5^3+120*d*n1^2*n3*n5^2+112*n3^3*n5^2+32*n5^5*n4+192*
| n3^2*n4^2*n5^2-64*n3*n5^4*d+48*n3*n5^4*n2+400*n1*n4^2*n5^2*n2-4410*n2*d^3*n5+
| 1280*n5^2*n2^2*n3-2960*n5^2*n2^2*d+2124*n2*n1^2*d^2)
""".stripMargin)
val e2 = ring(
"""
| (-44*d*n5^2*n2*n1
| ^2-4*d^2*n2^3*n4+8*n1*n5^4*n2-32*n4*n2-16*n1*n3*n5*n2^2*n4-24*n1*n2^2*n5*d*n3-
| 12*d^2*n5^3*n4-4*n5^4*d*n1-36*n1*n5*d*n3+12*n1*d^2*n3-116*n1*n5^2*d+96*n1*d^2*
| n5-40*n1*d^3*n5+32*n2*n1^2*n3-32*n1*n2*n4^2-12*n4^2*d^2-10*n1*n4*n5^2*d^2-12*n3
| *d^2*n4-16*n1*d+32*n1*n5-32*n1*n4+32*n1*n2+32*n1^2-32*n5*n4+8*n1^3*n5^2+16*n1^2
| *n5*n2^2*n4+104*n1*n2^2*n5+24*n1*n3*n2^2+40*n5^2*n2*n1*n3-8*n2^2*n4^2*d^2-32*n1
| ^2*n2^2*d+3*n1*n4^2*d^3+80*d*n2^2*n4+36*d*n2*n4^2-96*n5*d^2*n4-104*n2*n1^2*d-32
| *n1*n5*n4^2+25*n5*n2*n4*d^3+16*n4*d+8*n1^3*n2*n3*n5+8*n1*n2^3*n5*n3-8*n5^2*n2^3
| *n4+96*n1*n5*n4*d-40*n1*n5^2*n4-80*n1*n5*n4*n2-80*n1*n2^2*d+212*d*n5*n4*n2+40*d
| *n4*n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
| +8*n1*n2^3*n4-16*n1*n2^2*n4^2-16*n1*n2^2*n3*n4-48*n5*n1*n4^2*n2+116*d*n5*n2^2*
| n4+28*d*n3*n4*n2^2-40*n3*n5*n2^2*n4+4*n1^2*n4*d^2+16*n1*d^3*n4-16*n1*n3*n4*d^2-
| 48*n1*n5*n4*d^2-32*n1*n2*n4*d^2+64*n5*n2*n3*n4*d-5*n3*d^3*n1*n5-n3*n4*d^4+8*n1*
| d*n3*n4*n2^2-10*n1*n5*n4^2*d^2-10*n1*n2*n4^2*d^2+40*n1*n2^2*n5*n3-116*n1*n2^2*
| n5*d-4*n1^3*n3*n5*d+16*n1^2*n5^3+32*d^2*n5*n2^2*n1-18*n5*n1*n4*n2*d^2+8*n1*n5^4
| +56*n5^3*n2*n1+8*n5*n1^3*n3-16*n1*n4*n3*n5^2*n2-4*n2*n1^3*n3*d+5*n5*n3*n4*d^3+
| 16*n5^2*n2^2*n1^2+6*n1^3*d^2*n5-68*n1^2*n5^2*d-44*n1*n5^3*d+68*n1*n5^2*d^2+72*
| n1^2*d^2*n5-8*d*n1^2*n3*n5^2-16*n1*n4^2*n5^2*n2+56*n2*n1^2*d^2)
""".stripMargin)
val e3 = ring(
"""
| (768-84*d^3*n4^3+1344*n1+2496*n2+1344*n3+1728*n4+2304*n5-
| 2944*d-448*d*n5^2*n2^3+373*n2^2*d^4-480*d*n5^2*n2*n1^2+788*d^2*n2^3*n4+848*n5^2
| *n2^3+48*n1^3*n2*n4^2+64*n1*n5^4*n2+32*n3*n2^4*n5+4736*n4*n2+864*n1*n3*n5*n2^2*
| n4+881*d^4*n3-72*n1*n2^4*d-752*n1*n2^2*n5*d*n3+256*n1*n3^2*d^2*n2+32*n3^2*n2^2*
| n5^2+16*n1^4*n5+1888*n3^2*n4*n5+2144*n3^2*n4*n2+96*n2^3*n4^3+504*d^2*n5^3*n4-48
| *n5^4*d*n1-2528*n3^2*n4*d-4400*n1*n5*d*n3+3392*n1*d^2*n3-4232*n1*n5^2*d+6380*n1
| *d^2*n5+320*n1*n4^3-2470*n1*d^3*n5-2432*n5^3*d-16*n3^2*d*n1^2*n5-72*n3*n2^4*d+
| 992*n2*n1^2*n3+2528*n1*n2*n4^2+864*n1*n2*n3^2-2504*n5*n2^3*d+2944*n4^2*d^2-72*d
| *n1^3*n2^2+5576*d^2*n5^2+32*n3*n5^2*n4^3-448*n3^3*d+144*n1^3*n2^2+304*n5*n2^4+
| 792*n1*n4*n5^2*d^2+96*n1*n4*n3*n5^3-8*n1^4*n5*d+5648*n3*d^2*n4-4128*n1*d+3040*
| n1*n5+2336*n1*n4+3552*n1*n2+896*n1^2+1664*n1*n3-4128*n3*d+3040*n3*n5+2592*n3*n4
| +3296*n3*n2+896*n3^2-7136*n5*d+2624*n5^2+4128*n5*n4+6048*n5*n2-7744*n2*d+448*n2
| ^4*n4+48*n1^2*n2*n4^3-32*n1^3*n3*n4*d+64*n1^3*n5^2-2984*n3*d^3+504*n3^2*n5*d^2*
| n2+432*n1^2*n5*n2^2*n4+384*n1*n3*n2^2*n4^2+4304*n1*n2^2*n5+1984*n1*n3*n2^2+96*
| n3*n5^3*n4^2+512*n2^2*n4^3+1184*n5^2*n2*n1*n3-3672*n5^2*n2*d*n3+944*n2^2*n4^2*d
| ^2-184*n5*d^5-1312*n1^2*n2^2*d-292*n1*n4^2*d^3-8752*d*n2^2*n4-5680*d*n2*n4^2+
| 164*n5*n4^3*d^2-128*n1*d*n5*n4^3+9180*n5*d^2*n4-3200*n2*n1^2*d+1808*n1*n5*n4^2+
| 32*n3^3*n4^2*n5-1976*n5*n2*n4*d^3-5376*n4*d+32*n1^3*n2*n3*n5+48*n1^3*n4^2+64*n1
| ^2*n4^3+3600*n5^2*n2^2-64*d*n1*n3^2*n5^2+96*n1*n2^3*n5*n3-8*n1*n4^4*d+16*n3^2*
| n5*n4^3-96*n4^3*n5^2*d+480*n5^2*n2^3*n4-8*d*n5*n4^4-7288*n1*n5*n4*d+2432*n1*n5^
| 2*n4+6912*n1*n5*n4*n2-5712*n1*n2^2*d+4624*d^2-480*n5^3*n2^2*d-16560*d*n5*n4*n2-
| 1872*d*n4*n5^2*n2^2-992*d*n4*n5^3*n2-8*d*n3*n4^4-1504*n5*n2^2*n4^2*d+676*n1^2*
| n2*n4*d^2+128*n3*n1^2*n5^2+96*n3*n5^2*n2^3-692*n2*n4^2*d^3-2600*n2*n1^2*d*n5-
| 296*n1*d*n5^3*n4+299*n1*d^4*n4-920*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+314*n5^2*d^4+
| 96*n1*n3*n2*n4^3+177*n4^2*d^4+728*d^2*n5*n2*n1^2+96*n1^2*n2^2*n3*n5-864*d*n3*n2
| ^2*n4^2+16*n3^4*n5-72*n3^3*n2*d*n5-14616*d*n5*n2-8504*n1*n2*d+1424*n3^2*n5+1424
| *n1^2*n5-2096*n1^2*d-368*n1^2*n2*n4^2*d+264*n1*n3^2*n4*d^2-48*n1*n3^3*n4*d+1536
| *n3^2*n2-2096*n3^2*d+2896*n3*n2^2-7896*n3*n2*d+3280*n1*n2^2+688*n1*n3^2+9476*n2
| *d^2+8712*n5*d^2-56*n1^2*n3^2*n4*d+16*n1^2*n3^2*n4*n5+104*d^2*n5^4+6512*n2^2*d^
| 2+646*n2*n4*d^4+672*n5*n2^2*n3*n4^2+1500*n1*n4^2*d^2+144*n3*n2^2*n4^3-260*d^3*
| n5^3+5680*n5*n2^2+5344*n5^2*n2-6288*n5^2*d-3904*n1*n3*d+2592*n1*n3*n5-7304*d*n2
| ^2+2464*n1*n5^2+6336*n1*n5*n2+688*n1^2*n3-7240*n1*n5*d+2464*n3*n5^2-408*d*n5*n2
| *n4^3+344*n1*n3*n4^2*d^2-312*d*n2^2*n4^3+240*n5*n2^2*n4^3+16*n2*n1*n4^4+32*n1*
| n2^4*n5+352*n1*n4*n5^3*n2+1280*n1*n5^2*n3+448*n5^3*n2^2*n4+1140*n1*n3*n5*d^2*n2
| +108*d^2*n3^3*n4+3040*n2^2+368*n1*n3*n5^2*d^2+512*n2*n3*n5^2*n4^2+1856*n1^2*n2+
| 5696*n3*n5*n2-7240*n3*n5*d+4996*n3*d^2+3200*n1*n2*n3+4996*n1*d^2+360*n1^2*n2^2*
| d^2-1408*d*n1^2*n4*n5+112*n1^3*n4*n5+624*n1^2*n4^2*n2+208*n1*n3^2*n4^2+96*n1*n3
| ^3*n4+128*n1*n3*n4^3+512*n3^2*n4^2*n5+272*n5^4*n4-766*n5^2*n4*d^3+144*n1*n2*n3^
| 2*n4^2-598*n1*n2*d^3*n3-192*n1*n2^3*d*n3+192*n2^2*n3^2*n4^2-776*n5^2*d*n3^2-
| 1230*n1*n2*d^3*n5-512*n1*n2^3*d*n5+16*n2*n5*n4^4+608*n1*n2^2*d^2*n3-280*n5*n3^2
| *d*n4^2+2064*n3*n5*n4^2+1088*n1*n3*n4^2-2416*n5*d*n1^2+881*n1*d^4+1664*n5*n3^2*
| n2+2240*n5*n2^3+144*n1*n2^2*n4^3+160*n5^2*n2^3*n1+16*n2*n3*n4^4-40*n2*n4^4*d-40
| *n3^3*n4^2*d+9120*n5*n2*n4-5672*n1*d*n4-4704*n1*n2^2*n4*d-568*d*n5*n4^3-4752*n1
| *n2*n3*n4*d+1312*n1*n2*n3*n4^2+944*n1*n2*n3^2*n4-6280*n3*d*n4-103*n3*d^5-9992*
| n5*n2^2*d-2952*n2*d^3*n1-44*n3^3*d^3+244*n5^3*d^2*n1-8216*n1*n2*n5*n4*d-9328*n1
| *n2*n4*d+208*n5*n2^4*n4-8*n5*n3^4*d+16*n2*n5^5-496*n1*n2*d*n5^3+656*n2*n1^2*n3*
| n5-1088*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2-250*n3^2*d^3*n5+336*n1^2*n2*n3*n4*n5+
| 176*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-5072*n3*n2^2*d+80*n3^3*n4*n2^2+144*n3^2*n4*n2
| ^3+7016*n3*d^2*n2+192*n1*n3*n2^2*n5^2+6380*n3*d^2*n5-168*n1^2*n3*n2^2*d+3264*n3
| *n5^2*n2-4232*n3*n5^2*d-56*n1^2*n5^3*d+32*n1*n3^3*n5+32*n1^2*n5^2*n4^2-1376*n1*
| n5^2*d*n3+2464*n1*n5*d^2*n3-96*n1*n3*n5^3*d+48*n2*n3^2*n4^3+2848*n1*n5^2*n2*n4-
| 1752*d*n5^3*n4-1824*n5^2*n4^2*d-7312*n2*n5^2*n4*d-316*n3*n4^2*d^3-9400*d*n5^2*
| n2+208*d^2*n5^2*n1^2+480*n1^2*n4^2-256*n1*n4^3*n2*d+576*n2^2*n5^2*n4^2+144*n3^3
| *n2*n5+5748*n3*n5*d^2*n2+3536*n5*n3*n2^2+240*n1*n2^3*n4^2-5248*n5*d^3+32*n5^5+
| 3008*n1*n4*n3*n5+2304*n1^2*n2*n5-4384*n1*n3*n4*d+736*n1^2*n3*n4-218*n4*n1^2*d^3
| +160*n3^2*n2^3+208*n3^2*n5^2*d^2+13084*n5*d^2*n2-422*d^5+96*n3*n5^4+76*n3^3*n5*
| d^2+16*n1^2*n5*n4^3-32*d*n1^2*n4^3-2416*n5*n3^2*d-1216*n3*n2^3*d-2640*d*n3^2*n2
| +96*n1^2*n2*n3^2*n4+288*n3^3*n2+32*n5^2*n2^4-9744*n3*n2*n4*d+2656*n3*n2*n4^2+
| 3936*n3*n2^2*n4-2556*n2^2*d^3+672*n1*n5^2*n4^2+240*n1*n5*n4^3-368*d*n1*n4^3+
| 3360*n1*n2*n3*n4*n5+3920*n5^2*n4*d^2+768*n3^2*n4*n5^2-2360*d*n5^3*n2+864*n3^2*
| n2^2+32*n1^4+964*n1*n3*n5*n4*d^2-1056*n2^2*n4*d^3+104*n4^3*n3*d^2-320*n2^3*d^3-
| 3224*n4^2*d+6628*n4*d^2+672*n1*n5*n2^2*n4^2-1320*n1*n5*n2*n4^2*d+104*n1*d^2*n4^
| 3+3104*n2*n4^2+244*n3*n5^3*d^2+624*n1*n5*n3^2-1136*n3*d*n1^2-2544*n1*n4^2*d-432
| *d*n3*n5^3*n4+16*n5*n4^4-1184*n4^2*d^3-560*n3*n2^2*d^3-692*n3^2*d^3-147*n4*d^5-
| 5272*n5*n2*n4^2*d+5112*n1*d^2*n4-288*n1^3*d*n5+384*n4^3+620*n1*d^2*n3^2-1296*n1
| *d^3*n3-592*d*n3^2*n4*n2^2+3284*n1*n2^2*d^2+98*n1^2*d^4+68*n1^3*n4*d^2+96*n4*n5
| ^3*n3^2+1384*n5^3*d^2+2208*n4*n2^3-16*n2^5*d-88*n3*n4^2*n1^2*d+416*n2*n3*n5^3*
| n4+1576*n2*n5*n4^2*d^2+336*n3*n2^3*d^2-32*n1*n2*n3^3*d-1136*n1*n3^2*d-4048*d^3*
| n4+320*n3*n4^3+96*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*n4^3+1396*n1*n2^2*n4*d^2+
| 80*n1^3*n2^2*n4-32*n3^4*d+32*n1^4*n2-486*n1*n3*n4*d^3+176*n1*n5*n2*n4^3+416*n1^
| 3*n2+1552*n5^2*n4^2+288*n1*n3*n2^3*n4-3816*d^3+2396*n3*d^2*n5^2-128*n5*n3*n4^3*
| d+528*n3*n5*n2^3*n4+4800*n4*n2^2+4032*n1*n4*n2*n3-4376*n5*n4^2*d-5728*d^3*n2-
| 692*d^3*n1^2+128*n3^2*n1*n5^2+1392*n1*n3*n2*n4*d^2-592*n1^2*n2^2*n4*d-1664*n1*
| n4*d*n5^2*n2-624*n1*n2^2*d^3-176*d*n4*n1^3*n2+224*n1^2*n3*n4*d^2-44*n1^3*d^3+
| 184*n3*d^4*n1+5284*n2^2*n4*d^2+3600*n1*n5*n2^2*n4+292*d^2*n2*n4^3-960*n1*n3^2*
| n4*d+624*n1*n3^2*n4*n5+832*n1*n3*n4^2*n5-11648*n2*d*n4+1120*n1^2*n4+1424*n1*n4^
| 2+272*n1^3-224*d*n5^3*n4^2+32*n2^2*n4^4-4368*d*n5^2*n2*n1-2744*n3*d^3*n2+1088*
| n3*n2^3-56*d*n3^2*n5^3-96*n1^3*n3*d+2932*n3*d^2*n2^2+4960*n3*n5*n4*d^2+5812*n3*
| n2*n4*d^2-2304*n2*n1^2*n4*d+1584*n2*n1^2*n4*n5+336*n2*n3^3*n4+432*n3*n2*n4^3+16
| *n1*n4^4+16*n1^4*n4+424*d^2*n4^3+144*n1*n2^4+12*n4^4*d^2-250*n1^2*d^3*n5+16*n2*
| n3^4+16*n5*n3^2*n2^3+336*n5^4*n2-368*n1*n5^2*n4^2*d+672*n3*n2*n5^3-168*n5*d*n3^
| 3*n4-80*n3^2*n2^3*d-2172*d^3*n5^2-456*n2^4*d+1008*n3^2*n4*n2^2-392*n3^3*n4*d+
| 304*n3^3*n4*n5+2496*n5*n2^2*n4^2+2128*n5*n2^3*n4-3120*d*n2^2*n4^2-2648*d*n2^3*
| n4+2612*n5*n4^2*d^2+3444*n2*n4^2*d^2+688*n5*n2*n4^3+272*n3^3*n5+800*n2*n4^3-
| 4008*n3*n5*d*n2^2+96*n1^2*n2*n3*n5^2-640*n3*n5^2*d*n1*n2+545*n5*n4*d^4-368*d*n3
| *n4^3+432*n1*n2*n4^3+240*n5*n4^2*n1^2*n2-168*n5*n4^2*n1^2*d-336*n1*n5*n3^2*n4*d
| +32*n3^4-32*n1^3*n5^2*d+16*n3^2*n2*n1^2*n5+192*n1*n5^3*n3-528*n1^2*n2*n3*n4*d-
| 2470*n5*n3*d^3-104*n1*n3^2*n4^2*d+152*n1^2*n4^2*d^2+96*n2*n1^2*n5^3+1696*n1*n2^
| 2*n5^2-8*n3^4*n2*d-56*d*n1^3*n4*n5+16*n2*n3^2*n5^3+240*n3*n2^3*n4^2+336*n1^3*n2
| *n5+864*n2^3*n4^2+1464*n3^2*n4*d^2-1344*n1*n2^3*d-2392*n5*n3*n4^2*d+124*n1^3*n2
| *d^2-112*n1*d^3*n3^2+32*n1^2*d^2*n3^2+1008*n1^2*n2^2*n4+320*n1^2*n4^2*n5-544*n1
| ^2*n4^2*d+16*n3*n4^4+1225*d^4*n4+400*n5^3*n4^2+176*n5^2*n4^3+80*n3^3*n4^2+32*n3
| ^4*n4+64*n3^2*n4^3-5536*n3*n2*n1*d+3840*n1*n5^2*n2-9960*n3*d*n2*n5+784*n3*n5*n2
| ^3+272*n1*n3^2*n2^2-456*n1^3*n2*d-224*n5*n4*n1^2*n3*d+528*n5*n4*n1*n2^3+692*d^2
| *n5*n2^3-203*n2*d^5-1110*d^3*n5*n2^2+464*n1*n2*n3^2*n5-944*n1*n2*n3^2*d-96*n3^3
| *d*n1+1552*n3*n4^2+10656*n2*n4*d^2+336*n1^2*n3*n2^2+6432*n1*n2*n5*d^2+84*n3^3*
| n2*d^2-103*n1*d^5+32*n1*n5^4*n4+192*n3^2*n4^2*d^2+368*n1*n2^3*d^2-400*n2*n3^2*
| n4^2*d+1440*n3^2*n4+3680*n5^2*n4+2416*n5*n4^2+432*n5*n2^3*n4^2-520*d*n2^3*n4^2-
| 4096*n3*n5*d*n1*n2+1352*n5*d^2*n3^2+1248*n1^2*n4*n5-1968*n1^2*n4*d+1504*n5^3*n4
| +1952*n1^2*n2*n4-704*n4^3*d+512*n3^2*n5*n2^2-1952*n1*n3*d*n5*n2*n4-828*n1*n5*n4
| *d^3-1108*n1*n2*n4*d^3-514*n5*n4^2*d^3-1416*n2*n3*n5*n4^2*d+2560*n2^2*n4^2-64*
| n1*d*n3*n4^3+720*n5^2*n3^2+4736*n3*n5*n4+5408*n3*n2*n4-10104*n5*d*n4-2944*d*n2^
| 3+144*n2*n3^3*n4*n5-2236*n3*n4*d^3-3670*n5*n4*d^3-4300*n2*n4*d^3+753*n2*d^4*n5-
| 1256*d*n5*n2^3*n4+16*n4^3*n5^3+1816*n3^2*d^2-1080*n3^2*d*n5*n2*n4+98*n3^2*d^4-
| 2120*n1*d*n5*n2^2*n4+112*n2*n1^3*n4*n5-56*n2*n1^2*d*n3^2+1500*n3^2*d^2*n2+976*
| n1*n2^3*n5+5796*n5*n2^2*d^2+464*n5^2*n2*n3^2+864*n5^2*n2*n1^2+9944*n5*n2*n4*d^2
| -288*n3^3*d*n5+832*n1*n5^3+1216*n1*n2^3+272*n1^3*n5+64*n1*n2*n3^3+352*n5^4+3648
| *n1*n3*n2*n5+3008*n3*n5^2*n4+1816*d^2*n1^2-576*n1*n3*d*n5^2*n4+1168*n3*n2^3*n4+
| 1920*n2*n5^2*n4^2+1696*n2*n5^3*n4+32*n5*n1^2*n3^2+64*n1^3*n5^2*n2+832*n5^3*n3-
| 1840*d*n5*n2*n3^2+384*n1*n2^3*n3+2488*d^2*n5*n2^2*n4+240*n3*n5*n4^3+3168*n5^2*
| n2^2*n4+544*n1*n4*n5^3+1312*n4^2+528*n5^2*n4^2*d^2+172*n1^2*n5*d^2*n3-184*n1^3*
| n2*d*n5+64*n1^3*n3*n4*n2+244*d^2*n3^3+432*n3^2*n5*n2^2*n4-136*n1*n2^2*d*n3^2-
| 360*d*n5^3*n2*n3+32*n4^2*n5^4+1748*d^4-240*n1*n2*d*n5*n3^2+96*n1*n4*n3^2*n5^2-
| 192*d*n2*n3^3*n4+940*n2*n3*n4^2*d^2-264*n3^2*n5*d*n2^2+288*n2*n1^2*n4*n5^2-352*
| n1^2*n5*d*n3*n2+172*n1*n5*d^2*n3^2+192*n1*n5^3*n2^2+240*n1*n3^2*n4*n2^2+32*n1*
| n3*n5*n4^3+768*n1*n5^2*n2^2*n4-312*n3^3*n2*d-11112*n5*n2*n1*d+720*n1^2*n5^2+480
| *n5*n4^3+42*d^6+2576*n2*n3*n5*n4*d^2+124*d^2*n2^4+64*n2*n4^4-344*n2*d^3*n1^2-
| 152*d*n4*n5^4+128*n1*n3*n5^2*n4^2+112*n3*n2^4*n4+7424*n3*n5*n4*n2-8440*n3*n5*n4
| *d+64*n3*n5^4*n4+1232*n1*n5^2*n2*d^2+96*n3*n5^3*n2^2+4096*n1*n5*n4+2496*n1*n4*
| n3-2984*n1*d^3-448*d*n1^3-464*n5^2*n3*n4^2*d+64*n1*n2*n3^3*n4+16*n2*n5*n1^4+684
| *n5*n3*n4^2*d^2+176*n1^2*n3*n4^2+1872*n2*n3^2*n4*n5+432*n1^2*n3*n4*n5+912*n1^2*
| n3*n4*n2-816*n1^2*n3*n4*d+1396*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+24*n1*d^2*n3^3+
| 1562*n5*d^4+64*n5^2*n3^3*n4+864*n1*n4*n3^2+3936*n1*n4*n2^2+7552*n2*n1*d^2+24*n1
| ^3*d^2*n3+2080*n5^3*n2-3488*n3*d*n5^2*n4+3168*n2*n3*n4*n5^2-2088*n1*n5*n4^2*d-
| 3040*n1*n2*n4^2*d-2792*n1*d*n5^2*n4-1232*n1*n3*n4^2*d-688*n3^2*n4^2*d+832*n3*n5
| ^2*n4^2-1046*d^3*n5^2*n2+32*n2^5+272*n3^3+1408*n5^3+1688*n2^3*d^2-968*d*n2*n4^3
| -536*n1^2*n2^2*n5*d+399*n3*d^4*n2+1124*n3*n5*n2^2*d^2-1136*n2*n5^2*n4^2*d+1152*
| n5^2*n2^2*d^2-1096*d^3*n5*n2*n3-416*d*n5*n2^3*n3+296*n1^2*d^2*n3*n2-2768*n3*n4^
| 2*d+6976*n5*n2^2*n4+4384*n5*n2*n4^2+624*n5*n3*n1^2+1184*n1^2*n2^2-448*d^3*n5^2*
| n1+352*n3^3*n4+608*n3^2*n4^2+96*n1*n3^3+224*n1^3*n4+128*n1^2*n3^2-2208*n1*n3*d*
| n2^2+3164*n1*n3*d^2*n2+244*n1^3*d^2-1148*n3*n2*n4*d^3-656*n1^2*n5*d*n3-656*n1*
| n5*d*n3^2+368*n1^2*n4*n5^2+64*n1^3*n4*n3-248*n1^3*n4*d+304*n1^3*n4*n2+392*n1^2*
| n5*n4*d^2-192*d*n1^2*n4*n5^2-32*n1^4*d+160*n2*n5^4*n4-688*n1*d*n2^3*n4-864*n1*d
| *n2^2*n4^2-2120*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-264*d*n2^4*n4+6144*n5^2*n4*n2-
| 6616*n5^2*n4*d-24*n1^3*n4^2*d-112*d*n1^2*n2^3+5152*n1*n2*n4-256*n3*d*n2*n4^3+
| 1000*n5^2*n3*n4*d^2+992*n1^2*n2^2*n5+96*n1*n5^3*n3*n2+256*n2*n5^3*n4^2+128*n2*
| n5^2*n4^3+768*n2^2*n3*n4*n5^2+1713*n2*d^4-384*d*n5^4+2416*n3*n2*n5*n4^2+1440*n3
| *n2^2*n4^2+768*n3*n5^3*n4+96*n2*n1^3*n3+112*n2*n1^2*n3^2-904*n3*n5^3*d-688*d*n3
| *n4*n2^3+32*n4^4-184*d*n5^4*n2+80*n1^2*n5*n2^3+64*n2^2*n5^4+32*n1^2*n3*n4^2*n5+
| 620*n1^2*d^2*n3+664*n5^3*n2*d^2+429*n1*n2*d^4-928*n5^2*n2^2*n1*d-656*n5^2*n2^2*
| d*n3+8*n1^4*d^2+1056*n1*n5^2*n3*n4-3424*n1*n5*n3*n4*d-1840*n2*n3*d*n5^2*n4-448*
| n3*n5^2*d^3-112*n3*d^3*n1^2+2160*n4*d^2*n5^2*n2+355*n1*d^4*n5+616*n5*n4*n3^2*d^
| 2+304*n3^2*n2*n5*n4^2+1168*n1*n2^3*n4+1440*n1*n2^2*n4^2+2016*n1*n2^2*n3*n4-2168
| *n5*n3^2*n4*d+2224*n5*n1*n4^2*n2-8360*d*n5*n2^2*n4-4704*d*n3*n4*n2^2+3600*n3*n5
| *n2^2*n4-3168*n3*n2*n4^2*d+1140*n1^2*n4*d^2-2028*n1*d^3*n4+2540*n1*n3*n4*d^2+
| 4276*n1*n5*n4*d^2+5588*n1*n2*n4*d^2-40*n4^4*d+688*n3^2*n2*n4^2-8776*n5*n2*n3*n4
| *d-2512*d*n2*n3^2*n4-456*n3*d^3*n1*n5+329*n3*n4*d^4+112*n1^2*n3^2*n4-544*n1*n2*
| n3^2*n4*d+368*n1*n2*n3^2*n4*n5-1184*n1*d*n3*n4*n2^2+880*n5^3*n2^2+64*n1*n3^2*n4
| ^2*n5+596*n1*n5*n4^2*d^2+908*n1*n2*n4^2*d^2-432*n5^2*n3^2*n4*d+32*n1^2*n5^2*n3*
| n4-448*n1*n3*n5*n4^2*d+80*n3^3*n2^2+32*n4*n2^5+1408*n1*n2^2*n5*n3-4872*n1*n2^2*
| n5*d+8*d^2*n3^4-16*n1^3*n3*n5*d+80*n5^3*n2^3+144*n1^2*n2^3*n4+112*n1*n2^4*n4-
| 280*n4*d^3*n3^2+192*n1^2*n2^2*n4^2+384*n2*n4*n3^2*n5^2-768*n1*n3*n2*n4^2*d+32*
| n1*n5^2*n3^2*n2+544*n1*n3*n2*n5*n4^2+96*n2^4*n4^2+1024*n3*n5^2*d^2*n2-128*n3^2*
| d*n1^2-960*n3^2*d*n2^2+112*n1^2*n5^3+1628*n3*n4^2*d^2+1364*d^2*n5*n2^2*n1+2424*
| n5*n1*n4*n2*d^2+16*n4*n1^2*n5^3-16*n1*n5*n3^3*d+96*n1*n5^4+240*n1^2*n3*n4*n2^2+
| 224*n1^2*n2^3+732*n3^2*n2*n4*d^2-152*d*n5*n2^4+64*n1^3*n2^2*n5-240*d*n5^2*n2*n3
| ^2+32*n1*n3^3*n4*n5-32*n5^2*n3^3*d+896*n5^3*n2*n1+16*n2*n3^4*n4-8*n1^4*n4*d+16*
| n1^4*n4*n2-16*n3^4*n4*d+16*n3^4*n4*n5+32*n5*n1^3*n3-16*n1^4*n2*d+640*n1*n4*n3*
| n5^2*n2-48*n2*n1^3*n3*d-962*n5*n3*n4*d^3+192*n5^2*n2^2*n1^2+5456*n5^2*n2*d^2+
| 1696*n2^3+416*n2^4+264*n3^2*n2^2*d^2+355*n3*d^4*n5+32*n5*n1*n3^2*n2^2+76*n1^3*d
| ^2*n5+144*n3*n2^4-776*n1^2*n5^2*d-904*n1*n5^3*d+2396*n1*n5^2*d^2+1352*n1^2*d^2*
| n5-16*n5^5*d+112*n3^2*n5^3-64*d*n1^2*n3*n5^2+64*n3^3*n5^2+16*n5^5*n4+96*n3^2*n4
| ^2*n5^2-48*n3*n5^4*d+32*n3*n5^4*n2+448*n1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*n3-116*n1*n2^2*n5*d-4*n1^3*n3
| *n5*d+16*n1^2*n5^3+32*d^2*n5*n2^2*n1-18*n5*n1*n4*n2*d^2+8*n1*n5^4+56*n5^3*n2*n1
| +8*n5*n1^3*n3-16*n1*n4*n3*n5^2*n2-4*n2*n1^3*n3*d+5*n5*n3*n4*d^3+16*n5^2*n2^2*n1
| ^2+6*n1^3*d^2*n5-68*n1^2*n5^2*d-44*n1*n5^3*d+68*n1*n5^2*d^2+72*n1^2*d^2*n5-8*d*
| n1^2*n3*n5^2-16*n1*n4^2*n5^2*n2+56*n2*n1^2*d^2)
""".stripMargin)
val e5 = ring(
"""
| (384+96*n1^
| 4*n2*n3-42*d^3*n4^3+1248*n1+1632*n2+864*n3+864*n4+1728*n5-1760*d-520*d*n5^2*n2^
| 3+373*n2^2*d^4-2224*d*n5^2*n2*n1^2+392*d^2*n2^3*n4+96*n1^3*n2*n3^2+976*n5^2*n2^
| 3+96*n1^3*n2*n4^2+256*n1*n5^4*n2+32*n3*n2^4*n5+2720*n4*n2+864*n1*n3*n5*n2^2*n4+
| 831*d^4*n3+48*n1*n5^3*n3^2-264*n1*n2^4*d+96*n1*n3^2*n2^3-2096*n1*n2^2*n5*d*n3+
| 520*n1*n3^2*d^2*n2+32*n3^2*n2^2*n5^2+256*n1^4*n5+1600*n3^2*n4*n5+1568*n3^2*n4*
| n2-16*n1^5*d+508*d^2*n5^3*n4+288*n1^2*n2^3*n3-216*n5^4*d*n1-2048*n3^2*n4*d-7832
| *n1*n5*d*n3+4692*n1*d^2*n3-8872*n1*n5^2*d+10716*n1*d^2*n5+176*n1*n4^3-4498*n1*d
| ^3*n5-3520*n5^3*d-256*n3^2*d*n1^2*n5-72*n3*n2^4*d+3072*n2*n1^2*n3+1632*n1*n2*n4
| ^2+1344*n1*n2*n3^2-2640*n5*n2^3*d+1708*n4^2*d^2+48*n1^2*n5^4-712*d*n1^3*n2^2+
| 6760*d^2*n5^2+32*n3*n5^2*n4^3-416*n3^3*d+1136*n1^3*n2^2+320*n5*n2^4+1116*n1*n4*
| n5^2*d^2+128*n1*n4*n3*n5^3-128*n1^4*n5*d+4160*n3*d^2*n4-4456*n1*d+4192*n1*n5+
| 1952*n1*n4+4064*n1*n2+1680*n1^2+1792*n1*n3-3016*n3*d+2720*n3*n5+1728*n3*n4+2560
| *n3*n2+688*n3^2-6064*n5*d+2752*n5^2+2848*n5*n4+5280*n5*n2-5704*n2*d+160*n2^4*n4
| +32*n1^2*n2*n4^3-120*n1^3*n3*n4*d+688*n1^3*n5^2-2626*n3*d^3+560*n3^2*n5*d^2*n2+
| 928*n1^2*n5*n2^2*n4+192*n1*n3*n2^2*n4^2+7632*n1*n2^2*n5+3328*n1*n3*n2^2+96*n3*
| n5^3*n4^2+128*n2^2*n4^3+3232*n5^2*n2*n1*n3-4488*n5^2*n2*d*n3+372*n2^2*n4^2*d^2+
| 48*n1^3*n5^3-212*n5*d^5-4352*n1^2*n2^2*d-224*n1*n4^2*d^3-5416*d*n2^2*n4-2896*d*
| n2*n4^2+88*n5*n4^3*d^2-88*n1*d*n5*n4^3+7204*n5*d^2*n4-7992*n2*n1^2*d+1552*n1*n5
| *n4^2+32*n3^3*n4^2*n5-1502*n5*n2*n4*d^3-3080*n4*d+464*n1^3*n2*n3*n5+96*n1^3*n4^
| 2+48*n1^2*n4^3+4144*n5^2*n2^2-272*d*n1*n3^2*n5^2+16*n1^4*n5^2+496*n1*n2^3*n5*n3
| +16*n3^2*n5*n4^3+112*n1^4*n3-64*n4^3*n5^2*d+224*n5^2*n2^3*n4-8432*n1*n5*n4*d+
| 3280*n1*n5^2*n4+7632*n1*n5*n4*n2-8632*n1*n2^2*d+3200*d^2-656*n5^3*n2^2*d-12048*
| d*n5*n4*n2-1280*d*n4*n5^2*n2^2-904*d*n4*n5^3*n2-8*d*n3*n4^4-616*n5*n2^2*n4^2*d+
| 1236*n1^2*n2*n4*d^2+1136*n3*n1^2*n5^2+112*n3*n5^2*n2^3+80*n3^2*n5^2*n1^2+32*n1*
| n2^2*n3^3+80*n1^3*n5^2*n3-356*n2*n4^2*d^3-8872*n2*n1^2*d*n5-456*n1*d*n5^3*n4+
| 325*n1*d^4*n4-2016*n1^2*n2*n5*n4*d-32*d*n3^2*n4^3+418*n5^2*d^4+48*n1*n3*n2*n4^3
| +108*n4^2*d^4+2756*d^2*n5*n2*n1^2+912*n1^2*n2^2*n3*n5-360*d*n3*n2^2*n4^2+16*n3^
| 4*n5-80*n3^3*n2*d*n5-13848*d*n5*n2-10848*n1*n2*d+1424*n3^2*n5+3984*n1^2*n5-4488
| *n1^2*d-408*n1^2*n2*n4^2*d+244*n1*n3^2*n4*d^2-40*n1*n3^3*n4*d+1344*n3^2*n2-1760
| *n3^2*d+2512*n3*n2^2-6632*n3*n2*d+4480*n1*n2^2+832*n1*n3^2+7692*n2*d^2+8184*n5*
| d^2-88*n1^2*n3^2*n4*d+32*n1^2*n3^2*n4*n5+184*d^2*n5^4+5880*n2^2*d^2+451*n2*n4*d
| ^4+272*n5*n2^2*n3*n4^2+1132*n1*n4^2*d^2+48*n3*n2^2*n4^3-400*d^3*n5^3+5456*n5*n2
| ^2+5952*n5^2*n2-7152*n5^2*d-4808*n1*n3*d+4160*n1*n3*n5-6184*d*n2^2+4768*n1*n5^2
| +9792*n1*n5*n2+1712*n1^2*n3-11096*n1*n5*d+2848*n3*n5^2-160*d*n5*n2*n4^3+256*n1*
| n3*n4^2*d^2-64*d*n2^2*n4^3+48*n5*n2^2*n4^3+208*n1*n2^4*n5+560*n1*n4*n5^3*n2+
| 3024*n1*n5^2*n3+320*n5^3*n2^2*n4+2604*n1*n3*n5*d^2*n2+96*d^2*n3^3*n4+2384*n2^2+
| 1036*n1*n3*n5^2*d^2+336*n2*n3*n5^2*n4^2+4096*n1^2*n2+5568*n3*n5*n2-7016*n3*n5*d
| +4044*n3*d^2+4224*n1*n2*n3+6108*n1*d^2+1376*n1^2*n2^2*d^2-2992*d*n1^2*n4*n5+544
| *n1^3*n4*n5+656*n1^2*n4^2*n2+160*n1*n3^2*n4^2+80*n1*n3^3*n4+80*n1*n3*n4^3+432*
| n3^2*n4^2*n5+288*n5^4*n4-710*n5^2*n4*d^3+96*n1*n2*n3^2*n4^2-1084*n1*n2*d^3*n3-
| 624*n1*n2^3*d*n3+96*n2^2*n3^2*n4^2-968*n5^2*d*n3^2-2456*n1*n2*d^3*n5-1376*n1*n2
| ^3*d*n5+1304*n1*n2^2*d^2*n3-240*n5*n3^2*d*n4^2+1536*n3*n5*n4^2+800*n1*n3*n4^2-
| 7520*n5*d*n1^2+1315*n1*d^4+1760*n5*n3^2*n2+2288*n5*n2^3+32*n1*n2^2*n4^3+544*n5^
| 2*n2^3*n1+16*n2*n3*n4^4-8*n2*n4^4*d-40*n3^3*n4^2*d+6368*n5*n2*n4-5168*n1*d*n4-
| 4504*n1*n2^2*n4*d-304*d*n5*n4^3-4400*n1*n2*n3*n4*d+832*n1*n2*n3*n4^2+784*n1*n2*
| n3^2*n4-4440*n3*d*n4-103*n3*d^5-10144*n5*n2^2*d-4560*n2*d^3*n1-44*n3^3*d^3+748*
| n5^3*d^2*n1-9480*n1*n2*n5*n4*d-8832*n1*n2*n4*d+48*n5*n2^4*n4-8*n5*n3^4*d+32*n2*
| n5^5-1488*n1*n2*d*n5^3+3232*n2*n1^2*n3*n5-3904*n2*n1^2*n3*d+144*n1^2*n2*n3*n4^2
| -282*n3^2*d^3*n5+704*n1^2*n2*n3*n4*n5+112*n2*n3*n5*n4^3+48*n2*n3^3*n4^2-4648*n3
| *n2^2*d+48*n3^3*n4*n2^2+48*n3^2*n4*n2^3+6300*n3*d^2*n2+784*n1*n3*n2^2*n5^2+6596
| *n3*d^2*n5-1088*n1^2*n3*n2^2*d+3856*n3*n5^2*n2-5128*n3*n5^2*d-432*n1^2*n5^3*d+
| 96*n1*n3^3*n5+32*n1^2*n5^2*n4^2-3568*n1*n5^2*d*n3+4812*n1*n5*d^2*n3-424*n1*n3*
| n5^3*d+48*n2*n3^2*n4^3+3808*n1*n5^2*n2*n4-1768*d*n5^3*n4-1360*n5^2*n4^2*d-6048*
| n2*n5^2*n4*d-222*n3*n4^2*d^3-11072*d*n5^2*n2+1028*d^2*n5^2*n1^2+512*n1^2*n4^2-
| 104*n1*n4^3*n2*d+256*n2^2*n5^2*n4^2+160*n3^3*n2*n5+6200*n3*n5*d^2*n2+3648*n5*n3
| *n2^2+96*n1*n2^3*n4^2-5348*n5*d^3+64*n5^5+3216*n1*n4*n3*n5+7056*n1^2*n2*n5-4048
| *n1*n3*n4*d+1136*n1^2*n3*n4-400*n4*n1^2*d^3+160*n3^2*n2^3+112*n1^2*n5^3*n3+264*
| n3^2*n5^2*d^2+13276*n5*d^2*n2-394*d^5+160*n3*n5^4+84*n3^3*n5*d^2+16*n1^2*n5*n4^
| 3-24*d*n1^2*n4^3-2536*n5*n3^2*d-1184*n3*n2^3*d-2432*d*n3^2*n2-56*n3*n1^4*d+144*
| n1^2*n2*n3^2*n4+272*n3^3*n2+32*n5^2*n2^4-6624*n3*n2*n4*d+1616*n3*n2*n4^2+2416*
| n3*n2^2*n4-2438*n2^2*d^3+640*n1*n5^2*n4^2+160*n1*n5*n4^3-200*d*n1*n4^3+3536*n1*
| n2*n3*n4*n5+3588*n5^2*n4*d^2+672*n3^2*n4*n5^2-3368*d*n5^3*n2+816*n3^2*n2^2+336*
| n1^4+1092*n1*n3*n5*n4*d^2-654*n2^2*n4*d^3+76*n4^3*n3*d^2-320*n2^3*d^3-1768*n4^2
| *d+4204*n4*d^2+32*n1^5*n2+416*n1*n5*n2^2*n4^2-1032*n1*n5*n2*n4^2*d+56*n1*d^2*n4
| ^3+1536*n2*n4^2+360*n3*n5^3*d^2+1216*n1*n5*n3^2-3272*n3*d*n1^2-1880*n1*n4^2*d-
| 400*d*n3*n5^3*n4-710*n4^2*d^3-560*n3*n2^2*d^3-660*n3^2*d^3-111*n4*d^5-2936*n5*
| n2*n4^2*d+4996*n1*d^2*n4-2000*n1^3*d*n5+192*n4^3+972*n1*d^2*n3^2-1986*n1*d^3*n3
| -336*d*n3^2*n4*n2^2+5476*n1*n2^2*d^2+289*n1^2*d^4+240*n1^3*n4*d^2+96*n4*n5^3*n3
| ^2+2072*n5^3*d^2+1216*n4*n2^3+16*n5*n1^2*n3^3-16*n2^5*d-88*n3*n4^2*n1^2*d+320*
| n2*n3*n5^3*n4+876*n2*n5*n4^2*d^2+336*n3*n2^3*d^2-80*n1*n2*n3^3*d-1576*n1*n3^2*d
| -2770*d^3*n4+256*n3*n4^3+768*n3*n1^3+64*n1*n5^3*n4^2+32*n1*n5^2*n4^3+1388*n1*n2
| ^2*n4*d^2+288*n1^3*n2^2*n4-32*n3^4*d+432*n1^4*n2-490*n1*n3*n4*d^3+96*n1*n5*n2*
| n4^3+2000*n1^3*n2+1152*n5^2*n4^2+240*n1*n3*n2^3*n4-2976*d^3+3016*n3*d^2*n5^2-96
| *n5*n3*n4^3*d+192*n3*n5*n2^3*n4+2912*n4*n2^2+3552*n1*n4*n2*n3-2848*n5*n4^2*d-
| 5042*d^3*n2-1854*d^3*n1^2+480*n3^2*n1*n5^2+1348*n1*n3*n2*n4*d^2-1096*n1^2*n2^2*
| n4*d-2288*n1*n4*d*n5^2*n2-1144*n1*n2^2*d^3-592*d*n4*n1^3*n2+388*n1^2*n3*n4*d^2-
| 256*n1^3*d^3+309*n3*d^4*n1+3288*n2^2*n4*d^2+3872*n1*n5*n2^2*n4+108*d^2*n2*n4^3-
| 864*n1*n3^2*n4*d+624*n1*n3^2*n4*n5+688*n1*n3*n4^2*n5-7216*n2*d*n4+1664*n1^2*n4+
| 1024*n1*n4^2+1120*n1^3-192*d*n5^3*n4^2-9744*d*n5^2*n2*n1-2610*n3*d^3*n2+1024*n3
| *n2^3+32*n1^2*n3^3*n2-80*d*n3^2*n5^3+16*n1*n5^5-896*n1^3*n3*d+2816*n3*d^2*n2^2+
| 4060*n3*n5*n4*d^2+4008*n3*n2*n4*d^2-3944*n2*n1^2*n4*d+3280*n2*n1^2*n4*n5+272*n2
| *n3^3*n4+272*n3*n2*n4^3+112*n1^4*n4+216*d^2*n4^3+432*n1*n2^4+4*n4^4*d^2-932*n1^
| 2*d^3*n5+16*n2*n3^4+16*n5*n3^2*n2^3+560*n5^4*n2-352*n1*n5^2*n4^2*d+928*n3*n2*n5
| ^3-152*n5*d*n3^3*n4-80*n3^2*n2^3*d-2772*d^3*n5^2-448*n2^4*d+32*n1^3*n3*n4*n5+
| 608*n3^2*n4*n2^2-352*n3^3*n4*d+272*n3^3*n4*n5+1088*n5*n2^2*n4^2+1136*n5*n2^3*n4
| -1304*d*n2^2*n4^2-1392*d*n2^3*n4+1732*n5*n4^2*d^2+1776*n2*n4^2*d^2+272*n5*n2*n4
| ^3+288*n3^3*n5+320*n2*n4^3-4288*n3*n5*d*n2^2+752*n1^2*n2*n3*n5^2-1936*n3*n5^2*d
| *n1*n2+457*n5*n4*d^4-280*d*n3*n4^3+176*n1*n2*n4^3+320*n5*n4^2*n1^2*n2-208*n5*n4
| ^2*n1^2*d-344*n1*n5*n3^2*n4*d+32*n3^4-360*n1^3*n5^2*d+304*n3^2*n2*n1^2*n5+768*
| n1*n5^3*n3-912*n1^2*n2*n3*n4*d-2694*n5*n3*d^3-80*n1*n3^2*n4^2*d+172*n1^2*n4^2*d
| ^2+560*n2*n1^2*n5^3+3936*n1*n2^2*n5^2-8*n3^4*n2*d-288*d*n1^3*n4*n5+16*n2*n3^2*
| n5^3+48*n3*n2^3*n4^2+16*n1^4*n5*n3+2144*n1^3*n2*n5+240*n2^3*n4^2+1192*n3^2*n4*d
| ^2-2656*n1*n2^3*d-1768*n5*n3*n4^2*d+788*n1^3*n2*d^2-196*n1*d^3*n3^2+184*n1^2*d^
| 2*n3^2-64*n1^3*n3^2*d+1744*n1^2*n2^2*n4+400*n1^2*n4^2*n5-600*n1^2*n4^2*d+16*n3*
| n4^4+887*d^4*n4+336*n5^3*n4^2+112*n5^2*n4^3+80*n3^3*n4^2+32*n3^4*n4+64*n3^2*n4^
| 3-8176*n3*n2*n1*d+7904*n1*n5^2*n2-10264*n3*d*n2*n5+832*n3*n5*n2^3+672*n1*n3^2*
| n2^2-2528*n1^3*n2*d-480*n5*n4*n1^2*n3*d+528*n5*n4*n1*n2^3+748*d^2*n5*n2^3-203*
| n2*d^5-1228*d^3*n5*n2^2+1248*n1*n2*n3^2*n5-1680*n1*n2*n3^2*d-152*n3^3*d*n1+1104
| *n3*n4^2+6972*n2*n4*d^2+1728*n1^2*n3*n2^2+11852*n1*n2*n5*d^2+84*n3^3*n2*d^2-167
| *n1*d^5+48*n1*n5^4*n4+160*n3^2*n4^2*d^2+820*n1*n2^3*d^2-288*n2*n3^2*n4^2*d+1152
| *n3^2*n4+3200*n5^2*n4+1520*n5*n4^2+96*n5*n2^3*n4^2-120*d*n2^3*n4^2-8488*n3*n5*d
| *n1*n2+1476*n5*d^2*n3^2+2512*n1^2*n4*n5-3176*n1^2*n4*d+1520*n5^3*n4+3104*n1^2*
| n2*n4-360*n4^3*d+560*n3^2*n5*n2^2-2128*n1*n3*d*n5*n2*n4-1032*n1*n5*n4*d^3-1162*
| n1*n2*n4*d^3-344*n5*n4^2*d^3-856*n2*n3*n5*n4^2*d+1120*n2^2*n4^2-40*n1*d*n3*n4^3
| +880*n5^2*n3^2+3744*n3*n5*n4+3584*n3*n2*n4-7512*n5*d*n4-2736*d*n2^3+112*n2*n3^3
| *n4*n5-1694*n3*n4*d^3-2994*n5*n4*d^3-2924*n2*n4*d^3+851*n2*d^4*n5-616*d*n5*n2^3
| *n4+16*n4^3*n5^3+1636*n3^2*d^2-776*n3^2*d*n5*n2*n4+98*n3^2*d^4-2344*n1*d*n5*n2^
| 2*n4+464*n2*n1^3*n4*n5-400*n2*n1^2*d*n3^2+1444*n3^2*d^2*n2+2272*n1*n2^3*n5+6164
| *n5*n2^2*d^2+560*n5^2*n2*n3^2+3648*n5^2*n2*n1^2+7436*n5*n2*n4*d^2-312*n3^3*d*n5
| +2240*n1*n5^3+2128*n1*n2^3+1712*n1^3*n5+128*n1*n2*n3^3+608*n5^4+128*n1^3*n3^2+
| 6832*n1*n3*n2*n5+2624*n3*n5^2*n4+4376*d^2*n1^2-720*n1*n3*d*n5^2*n4+544*n3*n2^3*
| n4+1200*n2*n5^2*n4^2+1552*n2*n5^3*n4+464*n5*n1^2*n3^2+512*n1^3*n5^2*n2+1184*n5^
| 3*n3-2000*d*n5*n2*n3^2+1024*n1*n2^3*n3+1620*d^2*n5*n2^2*n4+176*n3*n5*n4^3+2240*
| n5^2*n2^2*n4+832*n1*n4*n5^3+656*n4^2+396*n5^2*n4^2*d^2+932*n1^2*n5*d^2*n3-1312*
| n1^3*n2*d*n5+208*n1^3*n3*n4*n2+236*d^2*n3^3+224*n3^2*n5*n2^2*n4-416*n1*n2^2*d*
| n3^2-504*d*n5^3*n2*n3+32*n4^2*n5^4+1504*d^4-752*n1*n2*d*n5*n3^2+112*n1*n4*n3^2*
| n5^2-152*d*n2*n3^3*n4+548*n2*n3*n4^2*d^2-288*n3^2*n5*d*n2^2+768*n2*n1^2*n4*n5^2
| -1984*n1^2*n5*d*n3*n2+424*n1*n5*d^2*n3^2+608*n1*n5^3*n2^2+192*n1*n3^2*n4*n2^2+
| 32*n1*n3*n5*n4^3+944*n1*n5^2*n2^2*n4-304*n3^3*n2*d+48*n1*n5^4*n3-18808*n5*n2*n1
| *d+3008*n1^2*n5^2+256*n5*n4^3+42*d^6+1868*n2*n3*n5*n4*d^2+124*d^2*n2^4+16*n2*n4
| ^4-1080*n2*d^3*n1^2-160*d*n4*n5^4+192*n1^3*n2^3+128*n1*n3*n5^2*n4^2+16*n3*n2^4*
| n4+5392*n3*n5*n4*n2-6816*n3*n5*n4*d+48*n1*n2*n3^3*n5+64*n3*n5^4*n4+2968*n1*n5^2
| *n2*d^2+128*n3*n5^3*n2^2+4512*n1*n5*n4+2176*n1*n4*n3-4058*n1*d^3-2096*d*n1^3-
| 376*n5^2*n3*n4^2*d+48*n1*n2*n3^3*n4+208*n2*n5*n1^4+504*n5*n3*n4^2*d^2+176*n1^2*
| n3*n4^2+1376*n2*n3^2*n4*n5+896*n1^2*n3*n4*n5+1472*n1^2*n3*n4*n2-1344*n1^2*n3*n4
| *d+816*n3*n2^2*n4*d^2-282*n3^2*d^3*n2+44*n1*d^2*n3^3+1702*n5*d^4+64*n5^2*n3^3*
| n4+752*n1*n4*n3^2+3616*n1*n4*n2^2+10640*n2*n1*d^2+256*n1^3*d^2*n3+2864*n5^3*n2-
| 3048*n3*d*n5^2*n4+2416*n2*n3*n4*n5^2-1800*n1*n5*n4^2*d-2016*n1*n2*n4^2*d-3856*
| n1*d*n5^2*n4-912*n1*n3*n4^2*d-584*n3^2*n4^2*d+656*n3*n5^2*n4^2-1344*d^3*n5^2*n2
| +32*n2^5+240*n3^3+1952*n5^3+1632*n2^3*d^2-376*d*n2*n4^3-2400*n1^2*n2^2*n5*d+399
| *n3*d^4*n2+1240*n3*n5*n2^2*d^2-712*n2*n5^2*n4^2*d+1416*n5^2*n2^2*d^2+48*n3^3*n1
| ^2-1230*d^3*n5*n2*n3-448*d*n5*n2^3*n3+1224*n1^2*d^2*n3*n2-1976*n3*n4^2*d+4640*
| n5*n2^2*n4+2416*n5*n2*n4^2+2672*n5*n3*n1^2+3392*n1^2*n2^2-1076*d^3*n5^2*n1+320*
| n3^3*n4+528*n3^2*n4^2+128*n1*n3^3+704*n1^3*n4+528*n1^2*n3^2-4192*n1*n3*d*n2^2+
| 5192*n1*n3*d^2*n2+1280*n1^3*d^2-796*n3*n2*n4*d^3-3192*n1^2*n5*d*n3-1448*n1*n5*d
| *n3^2+32*n1^5+976*n1^2*n4*n5^2+240*n1^3*n4*n3-832*n1^3*n4*d+960*n1^3*n4*n2+872*
| n1^2*n5*n4*d^2-528*d*n1^2*n4*n5^2-384*n1^4*d+160*n2*n5^4*n4-640*n1*d*n2^3*n4-
| 480*n1*d*n2^2*n4^2-1232*n3*d*n5*n2^2*n4-40*n3^3*n2^2*d-80*d*n2^4*n4+5008*n5^2*
| n4*n2-5936*n5^2*n4*d-48*n1^3*n4^2*d-712*d*n1^2*n2^3+4576*n1*n2*n4-152*n3*d*n2*
| n4^3+876*n5^2*n3*n4*d^2+3840*n1^2*n2^2*n5+432*n1*n5^3*n3*n2+192*n2*n5^3*n4^2+64
| *n2*n5^2*n4^3+432*n2^2*n3*n4*n5^2+1615*n2*d^4-672*d*n5^4-24*n1^2*n3^3*d+1488*n3
| *n2*n5*n4^2+656*n3*n2^2*n4^2+704*n3*n5^3*n4+960*n2*n1^3*n3+640*n2*n1^2*n3^2-
| 1312*n3*n5^3*d+288*n1^3*n2^2*n3-288*d*n3*n4*n2^3+16*n4^4-312*d*n5^4*n2+624*n1^2
| *n5*n2^3+96*n2^2*n5^4+32*n1^2*n3*n4^2*n5+2032*n1^2*d^2*n3+976*n5^3*n2*d^2+722*
| n1*n2*d^4-2384*n5^2*n2^2*n1*d-800*n5^2*n2^2*d*n3+108*n1^4*d^2+1296*n1*n5^2*n3*
| n4-3776*n1*n5*n3*n4*d-1384*n2*n3*d*n5^2*n4-582*n3*n5^2*d^3-412*n3*d^3*n1^2+1796
| *n4*d^2*n5^2*n2+695*n1*d^4*n5+520*n5*n4*n3^2*d^2+224*n3^2*n2*n5*n4^2+1056*n1*n2
| ^3*n4+800*n1*n2^2*n4^2+1776*n1*n2^2*n3*n4-1832*n5*n3^2*n4*d+1712*n5*n1*n4^2*n2-
| 5536*d*n5*n2^2*n4-2832*d*n3*n4*n2^2+2192*n3*n5*n2^2*n4-1896*n3*n2*n4^2*d+1972*
| n1^2*n4*d^2-2100*n1*d^3*n4+2460*n1*n3*n4*d^2+5152*n1*n5*n4*d^2+5588*n1*n2*n4*d^
| 2-16*n4^4*d+512*n3^2*n2*n4^2-6392*n5*n2*n3*n4*d-1824*d*n2*n3^2*n4-968*n3*d^3*n1
| *n5+254*n3*n4*d^4+176*n1^2*n3^2*n4-472*n1*n2*n3^2*n4*d+352*n1*n2*n3^2*n4*n5-
| 1080*n1*d*n3*n4*n2^2+1184*n5^3*n2^2+64*n1*n3^2*n4^2*n5+516*n1*n5*n4^2*d^2+616*
| n1*n2*n4^2*d^2-384*n5^2*n3^2*n4*d+96*n1^2*n5^2*n3*n4-376*n1*n3*n5*n4^2*d+48*n1^
| 3*n4*n5^2+80*n3^3*n2^2+3424*n1*n2^2*n5*n3-9512*n1*n2^2*n5*d+8*d^2*n3^4-336*n1^3
| *n3*n5*d+96*n5^3*n2^3+288*n1^2*n2^3*n4+96*n1*n2^4*n4-228*n4*d^3*n3^2+192*n1^2*
| n2^2*n4^2+272*n2*n4*n3^2*n5^2-496*n1*n3*n2*n4^2*d+240*n1*n5^2*n3^2*n2+16*n1*n5^
| 2*n3^3+400*n1*n3*n2*n5*n4^2+1288*n3*n5^2*d^2*n2+128*n1^2*n2^4-632*n3^2*d*n1^2-
| 936*n3^2*d*n2^2+800*n1^2*n5^3+1156*n3*n4^2*d^2+2932*d^2*n5*n2^2*n1+2904*n5*n1*
| n4*n2*d^2+64*n4*n1^2*n5^3-56*n1*n5*n3^3*d+400*n1*n5^4+432*n1^2*n3*n4*n2^2+1136*
| n1^2*n2^3+32*n1*n2^5+524*n3^2*n2*n4*d^2+96*n1*n2^4*n3-160*d*n5*n2^4+624*n1^3*n2
| ^2*n5-288*d*n5^2*n2*n3^2+32*n1*n3^3*n4*n5-40*n5^2*n3^3*d+2496*n5^3*n2*n1+16*n2*
| n3^4*n4-56*n1^4*n4*d+96*n1^4*n4*n2+16*n1^4*n4*n5-16*n3^4*n4*d+16*n3^4*n4*n5+640
| *n5*n1^3*n3-264*n1^4*n2*d+784*n1*n4*n3*n5^2*n2-592*n2*n1^3*n3*d-794*n5*n3*n4*d^
| 3+1008*n5^2*n2^2*n1^2+6736*n5^2*n2*d^2+1504*n2^3+400*n2^4+264*n3^2*n2^2*d^2+32*
| n3^2*n5*n1^3+405*n3*d^4*n5+288*n5*n1*n3^2*n2^2+572*n1^3*d^2*n5+192*n2^2*n1^2*n3
| ^2+144*n3*n2^4-3552*n1^2*n5^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d^2+16*n1*d^3*n4-16*n1*n3*n4*d^2-48*n1*
| n5*n4*d^2-32*n1*n2*n4*d^2+64*n5*n2*n3*n4*d-5*n3*d^3*n1*n5-n3*n4*d^4+8*n1*d*n3*
| n4*n2^2-10*n1*n5*n4^2*d^2-10*n1*n2*n4^2*d^2+40*n1*n2^2*n5*n3-116*n1*n2^2*n5*d-4
| *n1^3*n3*n5*d+16*n1^2*n5^3+32*d^2*n5*n2^2*n1-18*n5*n1*n4*n2*d^2+8*n1*n5^4+56*n5
| ^3*n2*n1+8*n5*n1^3*n3-16*n1*n4*n3*n5^2*n2-4*n2*n1^3*n3*d+5*n5*n3*n4*d^3+16*n5^2
| *n2^2*n1^2+6*n1^3*d^2*n5-68*n1^2*n5^2*d-44*n1*n5^3*d+68*n1*n5^2*d^2+72*n1^2*d^2
| *n5-8*d*n1^2*n3*n5^2-16*n1*n4^2*n5^2*n2+56*n2*n1^2*d^2)
""".stripMargin)
val e7 = ring(
"""
| (32+88*n1+88*n2+88*n3+88*n4+
| 64*n5-88*d+104*n4*n2-130*n1*d+100*n1*n5+104*n1*n4+104*n1*n2+52*n1^2+104*n1*n3-
| 130*n3*d+100*n3*n5+104*n3*n4+104*n3*n2+52*n3^2-108*n5*d+40*n5^2+100*n5*n4+100*
| n5*n2-130*n2*d-130*n4*d+72*d^2-72*d*n5*n2-68*n1*n2*d+28*n3^2*n5+28*n1^2*n5-34*
| n1^2*d+24*n3^2*n2-34*n3^2*d+24*n3*n2^2-68*n3*n2*d+24*n1*n2^2+24*n1*n3^2+45*n2*d
| ^2+42*n5*d^2+28*n5*n2^2+28*n5^2*n2-32*n5^2*d-68*n1*n3*d+56*n1*n3*n5-34*d*n2^2+
| 28*n1*n5^2+56*n1*n5*n2+24*n1^2*n3-72*n1*n5*d+28*n3*n5^2+52*n2^2+24*n1^2*n2+56*
| n3*n5*n2-72*n3*n5*d+45*n3*d^2+48*n1*n2*n3+45*n1*d^2+56*n5*n2*n4-68*n1*d*n4-68*
| n3*d*n4-34*n4^2*d+45*n4*d^2+24*n2*n4^2+8*n4^3-18*d^3+24*n4*n2^2-68*n2*d*n4+24*
| n1^2*n4+24*n1*n4^2+8*n1^3+24*n3*n4^2+24*n3^2*n4+28*n5^2*n4+28*n5*n4^2+56*n3*n5*
| n4+48*n3*n2*n4-72*n5*d*n4+52*n4^2+56*n1*n5*n4+48*n1*n4*n3+8*n3^3+8*n5^3+48*n1*
| n2*n4+8*n2^3)
""".stripMargin)
ring.coder.bind("a1", a1)
ring.coder.bind("a2", a2)
ring.coder.bind("a3", a3)
ring.coder.bind("a4", a4)
ring.coder.bind("a5", a5)
ring.coder.bind("a6", a6)
ring.coder.bind("a7", a7)
ring.coder.bind("a8", a8)
ring.coder.bind("a9", a9)
ring.coder.bind("a10", a10)
ring.coder.bind("a11", a11)
ring.coder.bind("a12", a12)
ring.coder.bind("a13", a13)
ring.coder.bind("a14", a14)
ring.coder.bind("b1", b1)
ring.coder.bind("b2", b2)
ring.coder.bind("b3", b3)
ring.coder.bind("b4", b4)
ring.coder.bind("c1", c1)
ring.coder.bind("c2", c2)
ring.coder.bind("c3", c3)
ring.coder.bind("c4", c4)
ring.coder.bind("c5", c5)
ring.coder.bind("c6", c6)
ring.coder.bind("c7", c7)
ring.coder.bind("c8", c8)
ring.coder.bind("c9", c9)
ring.coder.bind("c10", c10)
ring.coder.bind("c11", c11)
ring.coder.bind("e1", e1)
ring.coder.bind("e2", e2)
ring.coder.bind("e3", e3)
ring.coder.bind("e4", e4)
ring.coder.bind("e5", e5)
ring.coder.bind("e6", e6)
ring.coder.bind("e7", e7)
println("===> parsed ")
for (i <- 1 to 100) {
var start = System.nanoTime()
val p1 = ring(
"""
| 1/12*a1/b1/b2/n4*b3/i/qq*ppp/b4 - 1/2*a2*a3*a4/(2*n1+2*n3+2*n5-d)/(2*n1+
| 2*n5+4+2*n3-3*d+2*n2+2*n4)/n4*ppp*a5/a6/i/qq + 1/12*a7/(2*n1+2*n3+2*n5-d)/(2*n1+2*n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2-68*n2*d*n4+
| 24*n1^2*n4+24*n1*n4^2+8*n1^3+24*n3*n4^2+24*n3^2*n4+28*n5^2*n4+28*n5*n4^2+56*n3*
| n5*n4+48*n3*n2*n4-72*n5*d*n4+52*n4^2+56*n1*n5*n4+48*n1*n4*n3+8*n3^3+8*n5^3+48*
| n1*n2*n4+8*n2^3)/i/qq/(8+4*n1+4*n2+4*n3+4*n4+16*n5-12*d+2*n4*n2-4*n1*d+6*n1*n5+
| 2*n1*n4+2*n1*n3-4*n3*d+6*n3*n5+2*n3*n2-16*n5*d+10*n5^2+6*n5*n4+6*n5*n2-4*n2*d-4
| *n4*d+6*d^2-3*d*n5*n2-n3*n2*d+n2*d^2+4*n5*d^2+2*n5^2*n2-5*n5^2*d-n1*n3*d+2*n1*
| n3*n5+2*n1*n5^2-3*n1*n5*d+2*n3*n5^2+2*n3*n5*n2-3*n3*n5*d+n3*d^2+n1*d^2+2*n5*n2*
| n4-n1*d*n4+n4*d^2-d^3-n2*d*n4+2*n5^2*n4-3*n5*d*n4+2*n1*n5*n4+2*n5^3)+(n2+n3-d+
| n4+n5+1)*n1/qq/i*ppp*c8/c9 - (2*n4+4+4*n3+2*n5+2*n2-3
| *d)*n1/qq/i*ppp*c10/c11/(2*n1+2*n5+4+2*n3-3*d+2*n2+2*
| n4)+1/2*(2*n4+4+4*n3+2*n5+2*n2-3*d)*n1/qq/i*ppp/(2+n1-d+n5+n2)
""".stripMargin)
val timeP3 = System.nanoTime() - start
println(s"p3: ${timeP3.nanos.toMillis}ms")
start = System.nanoTime()
val p4 = ring(
"""
| -1/12*(2*
| n1*n2-2*n1*n4+4*n2+2*n5*n2+n4*d-3*n2*d+2*n3*n2-2*n3*n4+4*n2^2-2*n5*n4+4*n4*n2)/
| n4*e1/i/qq*ppp/e2+1/2*(n1-d+n5+n4
| +n2+n3+1)*n2/n4*ppp*e3/e4/i/qq-1/12*(2*n1*n2-2*n1*n4+4*n2
| +2*n5*n2+n4*d-3*n2*d+2*n3*n2-2*n3*n4+4*n2^2-2*n5*n4+4*n4*n2)/n4*ppp*e5/e6/i/qq+1/2*(n1-d+n5+n4+n2
| +n3+1)*(2*n1*n2-2*n1*n4+4*n2+2*n5*n2+n4*d-3*n2*d+2*n3*n2-2*n3*n4+4*n2^2-2*n5*n4
| +4*n4*n2)/n4/(4*n2+4*n3+4*n4+4*n1-3*d+2*n5+2)*ppp*e7/i/qq/(8+4*n1+4*n2+4*n3+4*n4+
| 16*n5-12*d+2*n4*n2-4*n1*d+6*n1*n5+2*
| n1*n4+2*n1*n3-4*n3*d+6*n3*n5+2*n3*n2-16*n5*d+10*n5^2+6*n5*n4+6*n5*n2-4*n2*d-4*
| n4*d+6*d^2-3*d*n5*n2-n3*n2*d+n2*d^2+4*n5*d^2+2*n5^2*n2-5*n5^2*d-n1*n3*d+2*n1*n3
| *n5+2*n1*n5^2-3*n1*n5*d+2*n3*n5^2+2*n3*n5*n2-3*n3*n5*d+n3*d^2+n1*d^2+2*n5*n2*n4
| -n1*d*n4+n4*d^2-d^3-n2*d*n4+2*n5^2*n4-3*n5*d*n4+2*n1*n5*n4+2*n5^3)
""".stripMargin)
val timeP4 = System.nanoTime() - start
println(s"p4: ${timeP4.nanos.toMillis}ms")
println(s"Total time: ${(timeP1 + timeP3 + timeP4).nanos.toMillis}ms")
println()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment