N := 6;
X := (u^16 + 16*u^15 + 120*u^14 + 561*u^13 + 1833*u^12 + 4446*u^11 + 8295*u^10 + 12165*u^9 + 14202*u^8 + 13276*u^7 + 9934*u^6 + 5907*u^5 + 2745*u^4 + 966*u^3 + 243*u^2 + 39*u + 3)*v^14 + (u^20 + 18*u^19 + 156*u^18 + 866*u^17 + 3466*u^16 + 10676*u^15 + 26312*u^14 + 53013*u^13 + 88047*u^12 + 120314*u^11 + 133797*u^10 + 118449*u^9 + 79870*u^8 + 36610*u^7 + 6167*u^6 - 6309*u^5 - 6795*u^4 - 3582*u^3 - 1176*u^2 - 231*u - 21)*v^13 + (u^24 + 20*u^23 + 196*u^22 + 1250*u^21 + 5824*u^20 + 21108*u^19 + 61839*u^18 + 150066*u^17 + 306339*u^16 + 530804*u^15 + 783496*u^14 + 982957*u^13 + 1038001*u^12 + 903890*u^11 + 624291*u^10 + 315159*u^9 + 90390*u^8 - 9322*u^7 - 20739*u^6 - 3921*u^5 + 6342*u^4 + 6096*u^3 + 2718*u^2 + 663*u + 72)*v^12 + (u^25 + 21*u^24 + 212*u^23 + 1350*u^22 + 6037*u^21 + 19972*u^20 + 49832*u^19 + 91958*u^18 + 110976*u^17 + 24066*u^16 - 277814*u^15 - 855113*u^14 - 1628097*u^13 - 2351923*u^12 - 2718874*u^11 - 2549054*u^10 - 1927988*u^9 - 1155981*u^8 - 534972*u^7 - 186660*u^6 - 52395*u^5 - 17843*u^4 - 9434*u^3 - 4395*u^2 - 1245*u - 159)*v^11 + (u^26 + 19*u^25 + 182*u^24 + 1122*u^23 + 4851*u^22 + 15228*u^21 + 34701*u^20 + 54026*u^19 + 40975*u^18 - 49711*u^17 - 223974*u^16 - 378156*u^15 - 295668*u^14 + 222906*u^13 + 1159323*u^12 + 2187250*u^11 + 2826145*u^10 + 2767745*u^9 + 2106864*u^8 + 1246692*u^7 + 568044*u^6 + 198913*u^5 + 56911*u^4 + 16670*u^3 + 5784*u^2 + 1680*u + 246)*v^10 - (u^25 + 33*u^24 + 450*u^23 + 3537*u^22 + 18486*u^21 + 69438*u^20 + 196708*u^19 + 432630*u^18 + 749163*u^17 + 1023760*u^16 + 1098648*u^15 + 931920*u^14 + 698352*u^13 + 688095*u^12 + 1047774*u^11 + 1602526*u^10 + 1960197*u^9 + 1842369*u^8 + 1323684*u^7 + 722946*u^6 + 297615*u^5 + 92632*u^4 + 23544*u^3 + 6123*u^2 + 1650*u + 273)*v^9 + (u^25 - 2*u^24 - 120*u^23 - 824*u^22 - 1922*u^21 + 4845*u^20 + 53602*u^19 + 219853*u^18 + 596265*u^17 + 1203343*u^16 + 1893976*u^15 + 2383974*u^14 + 2448820*u^13 + 2119087*u^12 + 1661430*u^11 + 1346977*u^10 + 1224379*u^9 + 1123788*u^8 + 889096*u^7 + 553408*u^6 + 259689*u^5 + 89623*u^4 + 22798*u^3 + 4926*u^2 + 1156*u + 217)*v^8 + (u^26 + 13*u^25 + 80*u^24 + 310*u^23 + 1111*u^22 + 4631*u^21 + 17095*u^20 + 45550*u^19 + 78419*u^18 + 55078*u^17 - 132101*u^16 - 556090*u^15 - 1139399*u^14 - 1644677*u^13 - 1833859*u^12 - 1652786*u^11 - 1261265*u^10 - 885574*u^9 - 632147*u^8 - 456410*u^7 - 294169*u^6 - 150401*u^5 - 56807*u^4 - 15022*u^3 - 2888*u^2 - 551*u - 121)*v^7 - (u^25 + 27*u^24 + 228*u^23 + 916*u^22 + 2544*u^21 + 6999*u^20 + 21550*u^19 + 61347*u^18 + 137742*u^17 + 227377*u^16 + 255888*u^15 + 143814*u^14 - 105188*u^13 - 379491*u^12 - 541098*u^11 - 530873*u^10 - 405120*u^9 - 268062*u^8 - 172628*u^7 - 108360*u^6 - 58281*u^5 - 23834*u^4 - 6624*u^3 - 1176*u^2 - 158*u - 45)*v^6 + (u^25 - 8*u^24 - 42*u^23 + 5*u^22 + 380*u^21 + 1143*u^20 + 2246*u^19 + 5909*u^18 + 21216*u^17 + 61078*u^16 + 124636*u^15 + 180426*u^14 + 184556*u^13 + 123899*u^12 + 30534*u^11 - 43600*u^10 - 68356*u^9 - 56469*u^8 - 37326*u^7 - 23913*u^6 - 13815*u^5 - 6265*u^4 - 1858*u^3 - 312*u^2 - 16*u - 10)*v^5 + (u^26 + 7*u^25 + 32*u^24 + 146*u^23 + 527*u^22 + 1426*u^21 + 3124*u^20 + 5972*u^19 + 10765*u^18 + 17628*u^17 + 23308*u^16 + 20288*u^15 + 4146*u^14 - 17494*u^13 - 30911*u^12 - 28486*u^11 - 14356*u^10 - 896*u^9 + 4385*u^8 + 3882*u^7 + 2805*u^6 + 1833*u^5 + 989*u^4 + 322*u^3 + 54*u^2 - 4*u + 1)*v^4 - (u^25 + 4*u^24 + 8*u^23 + 30*u^22 + 119*u^21 + 391*u^20 + 938*u^19 + 1902*u^18 + 3624*u^17 + 6551*u^16 + 10194*u^15 + 12123*u^14 + 10573*u^13 + 6477*u^12 + 2262*u^11 + 275*u^10 + 360*u^9 + 846*u^8 + 610*u^7 + 359*u^6 + 193*u^5 + 114*u^4 + 40*u^3 + 8*u^2 - u)*v^3 + (u^24 + 4*u^23 + 12*u^22 + 26*u^21 + 56*u^20 + 116*u^19 + 203*u^18 + 306*u^17 + 441*u^16 + 804*u^15 + 1368*u^14 + 1747*u^13 + 1732*u^12 + 1272*u^11 + 727*u^10 + 358*u^9 + 255*u^8 + 142*u^7 + 69*u^6 + 26*u^5 + 12*u^4 + 4*u^3 + u^2)*v^2 + (u^20 + 2*u^19 + 4*u^18 + 4*u^17 + 15*u^16 + 36*u^15 + 28*u^14 + 7*u^13 - 28*u^12 - 36*u^11 - 29*u^10 - 4*u^9 - 4*u^8 - 2*u^7 - u^6)*v + u^16 - u^13 + u^10;
Xz := u^13*v^5 - z*u^13*v^2 - z*u^12*v^6 + (-z + 9)*u^12*v^5 + (-z - 1)*u^12*v^4 + (-z - 1)*u^12*v^3 + (-4*z - 1)*u^12*v^2 - u^12*v - 10*z*u^11*v^6 + (-6*z + 42)*u^11*v^5 + (-2*z - 14)*u^11*v^4 + (2*z - 10)*u^11*v^3 + (-12*z - 6)*u^11*v^2 - 2*u^11*v - 48*z*u^10*v^6 + (-6*z + 126)*u^10*v^5 + (14*z - 76)*u^10*v^4 + (12*z - 30)*u^10*v^3 + (-28*z - 6)*u^10*v^2 - 4*u^10*v - 144*z*u^9*v^6 + (51*z + 273)*u^9*v^5 + (61*z - 230)*u^9*v^4 + (20*z - 31)*u^9*v^3 + (-58*z - 1)*u^9*v^2 - 6*u^9*v + u^8*v^7 + (-300*z + 5)*u^8*v^6 + (246*z + 456)*u^8*v^5 + (97*z - 477)*u^8*v^4 + (-12*z + 13)*u^8*v^3 + (-93*z + 12)*u^8*v^2 + (5*z - 9)*u^8*v + z*u^8 + 8*u^7*v^7 + (-456*z + 24)*u^7*v^6 + (580*z + 584)*u^7*v^5 + (-4*z - 756)*u^7*v^4 + (-72*z + 132)*u^7*v^3 + (-92*z + 20)*u^7*v^2 + (16*z - 12)*u^7*v + 28*u^6*v^7 + (-520*z + 40)*u^6*v^6 + (872*z + 544)*u^6*v^5 + (-268*z - 892)*u^6*v^4 + (-52*z + 292)*u^6*v^3 + (-52*z + 4)*u^6*v^2 + (12*z - 16)*u^6*v + (-z + 56)*u^5*v^7 + (-456*z + 7)*u^5*v^6 + (912*z + 369)*u^5*v^5 + (-485*z - 746)*u^5*v^4 + (62*z + 367)*u^5*v^3 + (-42*z -42)*u^5*v^2 + (9*z - 12)*u^5*v + u^5 + (-5*z + 70)*u^4*v^7 + (-309*z - 69)*u^4*v^6 + (703*z + 226)*u^4*v^5 + (-484*z - 439)*u^4*v^4 + (126*z + 270)*u^4*v^3 + (-37*z - 58)*u^4*v^2 + 6*z*u^4*v + (-10*z + 56)*u^3*v^7 + (-150*z - 110)*u^3*v^6 + (402*z + 172)*u^3*v^5 + (-336*z - 218)*u^3*v^4 + (120*z + 128)*u^3*v^3 + (-30*z - 28)*u^3*v^2 + 4*z*u^3*v + (-10*z + 28)*u^2*v^7 + (-40*z - 80)*u^2*v^6 + (150*z + 120)*u^2*v^5 + (-154*z -114)*u^2*v^4 + (70*z + 58)*u^2*v^3 + (-18*z - 12)*u^2*v^2 + 2*z*u^2*v + (-5*z + 8)*u*v^7 - 30*u*v^6 + (25*z + 50)*u*v^5 + (-35*z - 45)*u*v^4 + (21*z + 21)*u*v^3 + (-7*z - 4)*u*v^2 + z*u*v + (-z + 1)*v^7 + (2*z - 5)*v^6 + (-z + 10)*v^5 - 10*v^4 + 5*v^3 - v^2;
q := u+1;
t := (v*u) / (u+1);
E := [(1+q)*t+(2-q),0,q*t^2+(1-q)*t,0,0];
P := [-t,t^2];
Q := [0,0];