强网杯

Crypto

1. EasyRSA

题目

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#encoding:utf-8
from Crypto.Util.number import long_to_bytes, bytes_to_long, getPrime
import random, gmpy2

class RSAEncryptor:
def __init__(self):
self.g = self.a = self.b = 0
self.e = 65537
self.factorGen()
self.product()

def factorGen(self):
while True:
self.g = getPrime(500)
while not gmpy2.is_prime(2*self.g*self.a+1):
self.a = random.randint(2**523, 2**524)
while not gmpy2.is_prime(2*self.g*self.b+1):
self.b = random.randint(2**523, 2**524)
self.h = 2*self.g*self.a*self.b+self.a+self.b
if gmpy2.is_prime(self.h):
self.N = 2*self.h*self.g+1
print(len(bin(self.N)))
return

def encrypt(self, msg):
return gmpy2.powmod(msg, self.e, self.N)


def product(self):
with open('/flag', 'rb') as f:
self.flag = f.read()
self.enc = self.encrypt(self.flag)
self.show()
print(f'enc={self.enc}')

def show(self):
print(f"N={self.N}")
print(f"e={self.e}")
print(f"g={self.g}")


RSAEncryptor()

观察题目,发现是 commonprime RSA $g<a+b$ 的情况

做法一:

已知 g ,即可计算

设 $y=x^{4g}$
则 $y^{u}\equiv y^{c} \pmod N$
于是可以使用大步小步法试着求 dlp
对于某些$d>\sqrt{c}$,大步为

小步为

在其中搜索碰撞
存在$y^{rd}\equiv y^{u-s} \pmod N$
可以求得$c=rd+s$
从而根据 c 可以计算出 a 和 b
从而得到 p、q
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from sage.all import *
from Crypto.Util.number import *
from sage.groups.generic import bsgs
from sage.all import isqrt
from sage.misc.misc_c import prod
import sage.rings.integer_ring as integer_ring
import sage.rings.integer
from sage.arith.srange import xsrange
from gmpy2 import iroot
#
# Lists of names (as strings) which the user may use to identify one
# of the standard operations:
#
multiplication_names = ('multiplication', 'times', 'product', '*')
addition_names = ('addition', 'plus', 'sum', '+')

N=24894350414989625911031283308277168570494853473112991211103425837137373907825546808317090945681095286921597859857804085402811976221748255032096758490755568701151989178807119628461722334377875332281631571643922473589681309828344656587477814419792449313365944194172112195430868664705135176694000778083946838700802246722672358404623155990644083612633942113953012749136041571421044218028388826783144812107575398236047802510961837572444973393495904391141849468050388557434387376701266993756371043482844580035711565163566803639281650857951694697419966535443017018696195483551523655526145199761912277898312419025240293141643
e=65537
g=2342316135956336269549176940731506332793030501032648498972141330132477159026231482234730908316183215946269707825148278352847015408199244188454042423299
enc=13865831661373487771647988222353027752303755915787963354245237452572394785488472237789270204907232902849008635034267057823230389802438917349808534727459429170070383709807338426183306646092021954635633251653938574360241386879982666475389204199911769664273884977317339962633706908428229504903089923038878578331925063410139538081878382857482780073530713187772451822287214686166020359278005140846983051482606015874945523091260441471317568156941474298712372990397469024231354667126351764376707763664918083507175458017675827784699241595765264379407070799046476244775502790828970579156646913503458696143725114451014880065788
nbits=2049
gamma=0.239
cbits = ceil(nbits * (0.5 - 2 * gamma))
n1=N
g1=g
v1 = ((n1 - 1) // (2*g1)) % (2*g1)
u1 = ((n1 - 1) // (2*g1)) // (2*g1)
left = (((2 * iroot(n1,2)[0]) // (2*g1)) - v1) // (2*g1)
right = (((3 * iroot(2*n1,2)[0]) // (4*g1)) - v1) // (2*g1)

dic = {}
b = pow(114514,2*g1,n1)
base = pow(b,left,n1)
D = iroot(right - left,2)[0]+1
step = pow(b,D,n1)
for i in range(D):
dic[base] = i
base = base * step % n1
print("baby step ready")

base = pow(b,u1,n1)
step = inverse(b,n1)
for i in range(D):
if(base in dic):
print("ans found!")
print(i,dic[base])
c = left+ i + D * dic[base]
break
base = base * step % n1

A = u1 - c
B = v1 + c * 2 * g1
C = iroot(B**2 - 4*A,2)[0]
x = (B+C) // 2
y = B-x
p1 = x*g1*2+1
q1 = y*g1*2+1
assert p1 * q1 == n1
print(p1)
print(q1)
phi=(p1-1)*(q1-1)
d=inverse(e,phi)
print(long_to_bytes(pow(enc,d,N)))

做法2:

爆破 a+b 的高位
${h//2g}-(a+b)_h=ab$
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from tqdm import trange
from Crypto.Util.number import *
N=54642322838521966106812419124141939188989640814860878861908076164639367595914
5121966895462614693455142554411163028001396684372032321947092854090758624197340
0790290637426639994633474521237504778470452401128211738166232528044670489778765
9122983658402386409111680527237824015035597005313191262677046034069311159229487
0776292093558039681230850237745734700397178207719049329635803852591834542861388
2658054097045829584997486511884231335763642503260060763979765035367578047024986
1726402474026943128529940611865467085977350731870140237435132883515585257875892
835970695457915025407153187085139372317622088931196367733198938707
e=65537
g=30408719679598005813513822952740053880824192707932592285090992724940866129793
35548205806725469849481228948811909984262857772287453967175931780503026101
enc=169217279901286549405410484546093060498006359685672908855046065850885358778
4111525919932614689259674005902903294306990214999295401335400595465024136817616
6717262074930938187076093385743103257206008984426730319621844540768570052906856
3728141312426715117366395837964460423408187964925670546828755262865217711795726
9752597315761438459186791120018967717784674354875007341279701686250089637574512
5624115608433787391085807075889515255210830361622016035288935853286037510176320
8002340975665900236158920007589811919320440649594981349559671453007881710217298
70111273798593291304516871631013979858203217888740299565006817016165
h = (N-1)//(2*g)
# print(h)
from gmpy2 import iroot
ab_ = h//(2*g)
# print(ab - a*b)
# print((ab - a*b).bit_length())
# print(2**24-13699487)
# for i in trange(2**24):
# ab = ab_ - i
# absum = h - 2*g*ab
# if absum**2-4*ab < 0:
# continue
# abdiff = iroot(absum**2-4*ab, 2)[0]
# a = (absum + abdiff) // 2
# b = (absum - abdiff) // 2
# if a*b == ab:
# print(a)
# print(b)
# break
a =
4793738693888445890037078687911805727587735746730025037037178739021186736608464
2223134071188443797365024207320451316918915461052607536742271505969247375076726
b =
3081758016069703112211946605193393419929381672024605092116994783558551757717305
4601468730432823632268542332991565084729244237756343912826384891209074376593659
p = 2*g*a + 1
q = 2*g*b + 1
assert p*q == N
phi = (p-1)*(q-1)
d = pow(65537, -1, phi)
m = pow(enc,d,N)
print(long_to_bytes(m))

2. apbq

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from Crypto.Util.number import *
from secrets import flag
from math import ceil
import sys

class RSA():
def __init__(self, privatekey, publickey):
self.p, self.q, self.d = privatekey
self.n, self.e = publickey

def encrypt(self, plaintext):
if isinstance(plaintext, bytes):
plaintext = bytes_to_long(plaintext)
ciphertext = pow(plaintext, self.e, self.n)
return ciphertext

def decrypt(self, ciphertext):
if isinstance(ciphertext, bytes):
ciphertext = bytes_to_long(ciphertext)
plaintext = pow(ciphertext, self.d, self.n)
return plaintext

def get_keypair(nbits, e = 65537):
p = getPrime(nbits//2)
q = getPrime(nbits//2)
n = p * q
d = inverse(e, n - p - q + 1)
return (p, q, d), (n, e)

if __name__ == '__main__':
pt = './output.txt'
fout = open(pt, 'w')
sys.stdout = fout

block_size = ceil(len(flag)/3)
flag = [flag[i:i+block_size] for i in range(0, len(flag), block_size)]
e = 65537

print(f'[+] Welcome to my apbq game')
# stage 1
print(f'┃ stage 1: p + q')
prikey1, pubkey1 = get_keypair(1024)
RSA1 = RSA(prikey1, pubkey1)
enc1 = RSA1.encrypt(flag[0])
print(f'┃ hints = {prikey1[0] + prikey1[1]}')
print(f'┃ public key = {pubkey1}')
print(f'┃ enc1 = {enc1}')
print(f'----------------------')

# stage 2
print(f'┃ stage 2: ai*p + bi*q')
prikey2, pubkey2 = get_keypair(1024)
RSA2 = RSA(prikey2, pubkey2)
enc2 = RSA2.encrypt(flag[1])
kbits = 180
a = [getRandomNBitInteger(kbits) for i in range(100)]
b = [getRandomNBitInteger(kbits) for i in range(100)]
c = [a[i]*prikey2[0] + b[i]*prikey2[1] for i in range(100)]
print(f'┃ hints = {c}')
print(f'┃ public key = {pubkey2}')
print(f'┃ enc2 = {enc2}')
print(f'----------------------')

# stage 3
print(f'┃ stage 3: a*p + q, p + bq')
prikey3, pubkey3 = get_keypair(1024)
RSA3 = RSA(prikey3, pubkey3)
enc3 = RSA2.encrypt(flag[2])
kbits = 512
a = getRandomNBitInteger(kbits)
b = getRandomNBitInteger(kbits)
c1 = a*prikey3[0] + prikey3[1]
c2 = prikey3[0] + b*prikey3[1]
print(f'┃ hints = {c1, c2}')
print(f'┃ public key = {pubkey3}')
print(f'┃ enc3 = {enc3}')

做法:

stage1明显解方程即可

exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from sage.all import *
from Crypto.Util.number import *
from sympy import symbols,solve
from random import randint
from itertools import product, combinations
#stage1
hints = 18978581186415161964839647137704633944599150543420658500585655372831779670338724440572792208984183863860898382564328183868786589851370156024615630835636170
public_key = (89839084450618055007900277736741312641844770591346432583302975236097465068572445589385798822593889266430563039645335037061240101688433078717811590377686465973797658355984717210228739793741484666628342039127345855467748247485016133560729063901396973783754780048949709195334690395217112330585431653872523325589, 65537)
enc1 = 23664702267463524872340419776983638860234156620934868573173546937679196743146691156369928738109129704387312263842088573122121751421709842579634121187349747424486233111885687289480494785285701709040663052248336541918235910988178207506008430080621354232140617853327942136965075461701008744432418773880574136247
n1=public_key[0]
e1=public_key[1]
p,q=symbols('p q')
eq1=p+q-hints
eq2=p*q-n1
solutions=solve([eq1,eq2],p,q)
p1=int(solutions[0][0])
q1=int(solutions[0][1])
d1=inverse(e1,(p1-1)*(q1-1))
flag1=long_to_bytes(pow(enc1,d1,n1))
print(flag1)

stage2
做法1:

正交格
已知$(a_i,b_i)\begin{pmatrix} p \\ q \end{pmatrix} = (h_i)$
因此

因为$a_i,b_i$都是 180bits,相对 p,q 而言很小
因此我们可以使用正交格,找到一个矩阵 M,使得

那么,我们有

可以猜想,AB 即为 M 的右核经规约产生的短向量
第一步:找到这样的 M
我们可以构造一个矩阵:

然后对 H 进行配平以使得规约出来的短向量正好满足

然后将所有满足这一条件的短向量合成一个矩阵
即求得 M
但实际求出的是 A-B 和 B (大小的关系)
得到 A 和 B 即可解出 p,q
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from Crypto.Util.number import *
from sage.all import *
hint2 = [18167664006612887319059224902765270796893002676833140278828762753019422055112981842474960489363321381703961075777458001649580900014422118323835566872616431879801196022002065870575408411392402196289546586784096, 16949724497872153018185454805056817009306460834363366674503445555601166063612534131218872220623085757598803471712484993846679917940676468400619280027766392891909311628455506176580754986432394780968152799110962, 17047826385266266053284093678595321710571075374778544212380847321745757838236659172906205102740667602435787521984776486971187349204170431714654733175622835939702945991530565925393793706654282009524471957119991, 25276634064427324410040718861523090738559926416024529567298785602258493027431468948039474136925591721164931318119534505838854361600391921633689344957912535216611716210525197658061038020595741600369400188538567, 22620929075309280405649238349357640303875210864208854217420509497788451366132889431240039164552611575528102978024292550959541449720371571757925105918051653777519219003404406299551822163574899163183356787743543, 20448555271367430173134759139565874060609709363893002188062221232670423900235907879442989619050874172750997684986786991784813276571714171675161047891339083833557999542955021257408958367084435326315450518847393, 16581432595661532600201978812720360650490725084571756108685801024225869509874266586101665454995626158761371202939602347462284734479523136008114543823450831433459621095011515966186441038409512845483898182330730, 23279853842002415904374433039119754653403309015190065311714877060259027498282160545851169991611095505190810819508498176947439317796919177899445232931519714386295909988604042659419915482267542524373950892662544, 16542280976863346138933938786694562410542429842169310231909671810291444369775133082891329676227328401108505520149711555594236523078258701726652736438397249153484528439336008442771240980575141952222517324476607, 17054798687400834881313828738161453727952686763495185341649729764826734928113560289710721893874591843482763545781022050238655346441049269145400183941816006501187555169759754496609909352066732267489240733143973, 22115728663051324710538517987151446287208882441569930705944807337542411196476967586630373946539021184108542887796299661200933395031919501574357288914028686562763621166172668808524981253976089963176915686295217, 19324745002425971121820837859939938858204545496254632010818159347041222757835937867307372949986924646040179923481350854019113237172710522847771842257888083088958980783122775860443475680302294211764812636993025, 17269103712436870749511150569030640471982622900104490728908671745662264368118790999669887094371008536628103283985205839448583011077421205589315164079023370873380480423797655480624151812894997816254147210406492, 17365467616785968410717969747207581822018195905573214322728668902230086291926193228235744513285718494565736538060677324971757810325341657627830082292794517994668597521842723473167615388674219621483061095351780, 20823988964903136690545608569993429386847299285019716840662662829134516039366335014168034963190410379384987535117127797097185441870894097973310130525700344822429616024795354496158261293140438037100429185280939, 19068742071797863698141529586788871165176403351706021832743114499444358327620104563127248492878047796963678668578417711317317649158855864613197342671267006688211460724339403654215571839421451060657330746917459, 20089639597210347757891251257684515181178224404350699015820324544431016085980542703447257134320668961280907495580251880177990935443438799776252979843969984270461013888122703933975001704404129130156833542263882, 22344734326131457204500487243249860924828673944521980798994250859372628295695660076289343998351448667548250129358262592043131205967592613289260998148991388190917863322690137458448696392344738292233285437662495, 22688858027824961235755458925538246922604928658660170686458395195714455094516952026243659139809095639584746977271909644938258445835519951859659822660413616465736923822988993362023001205350387354001389518742538, 21286046487289796335501643195437352334100195831127922478044197411293510360710188581314023052580692810484251118253550837525637065385439859631494533102244585493243972819369812352385425700028640641292410326514111, 21542729548465815605357067072323013570796657575603676418485975214641398139843537820643982914302122976789859817102498484496409546012119998359943274203338400776158986205776474024356567247508744784200354385060666, 22319592382753357951626314613193901130171847776829835028715915533809475362288873045184870972146269975570664009921662023590318988850871708674240304838922536028975978222603171333743353770676344328056539379240160, 25195209191944761648246874631038407055240893204894145709996399690807569652160721616011712739214434932639646688187304865397816188999592774874989401871300784534538762135830014255425391132306536883804201055992313, 18257804244956449160916107602212089869395886846990320452133193087611626919926796845263727422042179229606817439442521540784268169177331707314788427670112999551683927934427716554137597798283300120796277229509678, 20293403064916574136692432190836928681820834973375054705153628740577159076332283715581047503287766236543327123639746352358718218140738999496451259789097826888955418315455420948960832865750253988992454128969953, 15967654820584966012628708475666706277218484919923639492431538068059543232562431059752700377242326527417238151501168940191488179144049286512652111172149113549072003881460743035279388672984805823560897688895124, 25144187979876039024245879200325843092774389926620026124061775431569974232758799200333888039013494603721065709195353330350750055309315207499741437181094874894647736904055829877859906318073991986020178158776286, 15736932921640444103019961538951409924080453868073105830403926861058056351553271238438325117113945341892868641345117717666354739204401152657265824568724844930574396801692131746182948347887298330990039956813130, 18831072673439732764722762485733622234889447953507582396819704359771208236721692820362137219509611319088756045211407777880521726782697895768017460064889670066178710804124631128581556314122255564861269062385337, 23800437561684813552661749774840752013501533683948618798811470214669024646396165487093720960221009038817909066075238937189371227098032581450466402462014437421254375846263830927945343485988463525070074913720710, 24402191070622494792723290726249952159888270689258801831518209605331984684494095167423722682814769395395011136124403802097229547003802312444913008194461779426175966774202219703164060353710247619639616444797670, 20215481513831963554421686543560596857659844027486522940060791775984622049024173363533378455076109165728144576719015392033536498353094895564917644840994662704362121549525329105205514332808950206092190939931448, 18384453917605955747212560280232547481041600196031285084598132475801990710125754705645482436436531608696373462641765399622296314590071558616193035939108523357020287896879479452040171765916716377102454266933226, 21890401344164908103930010123434944359446535642544335610455613014563290097498740447164765588532234051104173227090428486681237432196639010849051113283297943367655458678533223039415083212229970648958070799280218, 18379893441293694747570620009241814202936873442370354246029979042247705730610190888710981918183390028386451290137755339890329474403224043675724851314770861939082447728194632548864823398818221526652331319263027, 18715827130228986951360013590464775001019026913384718876134449689773600060962392738619405370033085704046027397895627933844824630723286144367800484157574548819065406118338665931032779491897783504790669824301288, 13588739911708699123450670852772302012518315143187739886523841133752009403411431627334135210166268158490674049617489193734568451811305631563767138879895461211915128972052001136464325219117009268526575020143259, 18506039912943821193373920483847347155611306173368341979655092778147169768984477236224526786441466933360500418090210912574990962709452725122792963919616633389125605160796446674502416801964271004625701238202575, 22167985517547342184812919437069844889650448522260359154086923601900060998572245598167213217022051141570075284051615276464952346620430587694188548679895095556459804921016744713098882496174497693878187665372865, 21507363933875318987283059841465034113263466805329282129011688531718330888226928182985538861888698160675575993935166249701145994333840516459683763957425287811252135418288516497258724668090570720893589001392220, 20250321586608105267884665929443511322540360475552916143405651419034772061789298150974629817817611591100450468070842373341756704300393352252725859102426665187194754280129749402796746118608937061141768301995522, 16104259151024766025645778755951638093681273234415510444173981198301666343334808614748361662637508091511498829253677167171091582942780017355912433497214576425697459483727777273045993446283721290714044600814203, 14560242181138184594433372530956542527312169507277535425067427080573272033961044062335960097446781943943464713852520415535775461964590009720592053626735276833191667395201287169782350381649400286337671320581068, 16239347596615402699390026749150381714807445218767496868569282767673828662340774349530405347667558555781433774705139593469838946201218537641296949822639509296966092138954685186059819628696340121356660166937131, 21344472317634795288252811327141546596291633424850284492351783921599290478005814133560171828086405152298309169077585647189366292823613547973428250604674234857289341613448177246451956695700417432794886277704716, 16053809990112020217624905718566971288375815646771826941011489252522755953750669513046736360397030033178139614200701025268874379439106827823605937814395162011464610496629969260310816473733828751702925621950679, 18917855883623050190154989683327838135081813638430345099892537186954876489710857473326920009412778140451855952622686635694323466827034373114657023892484639238914593012175120540210780102536003758794571846502397, 22690171278715056779052233972642657173540399024770527983659216197108042021644328773010698851143953503599329885607621773816718008861742027388432534850163666629476315340137626681994316866368449548292328156728206, 21087818524872480052313215092436868441694786060866149491087132591272640372512484925209820065536439188250579925233059144898601140234767300574307770064543499923712729705795392684173268461519802573563186764326797, 18439753470094841291394543396785250736332596497190578058698960152415339036714664835925822942784700917586270640813663002161425694392259981974491535370706560550540525510875465091384383255081297963169390777475352, 20105719699015744146039374208926740159952318391171137544887868739518535254000803811729763681262304539724253518465850883904308979964535242371235415049403280585133993732946919550180260852767289669076362115454200, 17251599484976651171587511011045311555402088003441531674726612079301412643514474016351608797610153172169183504289799345382527665445027976807805594288914226822374523878290416047130731166794970645275146679838899, 23027331991437585896233907022469624030630702237261170259290872847355304456043379238362120518409085840638396736666056992747627271193089116095167049248270541979716594671069985183070290375121270398623215587207529, 18158149685496169798299129683009221264185608469410295069411669832919646968324946121757411511373498747604679198739125835462814352243797919744572086307939585501566092705355693015625009717017077302201663788208609, 18276153196656501517216055049560959047263892309902154534799806637704337317207294332426798932144785240877892837491213916540255237702169595754963908689566362060228840286531616263506272071630209104758589482803348, 19830654702835464289082520892939657653574451119898587213320188332842291005863699764597454403874285715252681820027919359194554863299385911740908952649966617784376852963552276558475217168696695867402522508290055, 15349828226638644963106414986240676364822261975534684137183044733508521003843559094515387144949811552173241406076270015291925943459603622043168219534080772937297911323165839870364550841685270125556125756627553, 20923687596111161976478930953796496927811701530608223491138786355445002217973253897724452954815797952200740069102515860924306246841340715110620719064010080520601890251137419840158983682372232110885549732743013, 21095748006022412831703352650023882351218414866517568822818298949510471554885207645049385966827210564667371665855668707424105040599599901165292360321667007968065708796593851653085339928947755081203265281357013, 20136320433636422315432754195821125224777716034031656342233368000257459497472596860252592531939146543685406198978058242599116859263546329669263543660114747385041549283367183026001454445297981439938401547228229, 16496919752274418275948572022974868132658743151124597724312835413857298109100258912203517423633396955060591787380445877361136405137884456764770035346437177846666365911942996404514058688909577420388537479730705, 13788728438272498164727737074811797093818033799836159894472736480763530670013682288670889124484670336660448907074673625466218166413315342420667608074179975422284472184048790475129281850298519112884101776426380, 24852871485448795332267345793743281093931161235481251209948049584749441451621572752080662697610253315331335180611651946374137068256112152253681972406000252076016099200912670370417045090034045383991812756120791, 18663346319122078996775762643035864683521213720864038756854558668694021987970601131985163948257100423991091156649638455828855082098689641225427227191064496066436196910238564311309556938903101074363279783438714, 21400068681031931459396470039651524575262457489792894764406364952394476440804779651233022862527636114968325782197380721095406628084183336358459476006267416033892771932528688312375109463803215034905281657962293, 16044158155847172030103761204572942507195578382208455423846603003318483484698088948486132040995746837257705704187725306831142305215342467016564452582165866039427184607605673304595194959499145031211096109534167, 16518253246325822837502418827700493807621067058438396395472266350036385535241769917459657069911028720968654253735107131282350340465691670072304718987805883113410923109703284511709226857412404454224134480632696, 22032469066601123287586507039704080058983969235246539501189720236880312024198451198788699002335010120658564926677243708367430773661097221076615953342733896063909953602379936312639192315223258556134958059637605, 17474611942177808070315948910226643697957069578572244709354155010512694059987765040746148981545760660371360975936526076852619987733316042847813177383519241505024635332293992920023420060610648140841369822739716, 20097265939024591617239874622716452182434300498447992668997438018575636772416262543204370899462096267444545094719202447520254303983442269757551626971917981420832391886214473318353984504467919530676605744560570, 18170251482705061226968041449812078923477452841162650888922564215790088545936753453513162197661916172215859504545409274440450807677845894292177296835154674774694992388033874349807244020099167681146357128785394, 18084007437523118129421476751918491055914528331902780911288404344016551650138679157754567938593688369062981279371320169939281882307797009116458871503759873023914718337944953764426183937635379280572434676575757, 17001811604221128900675671565539617923973183364469396458234914432162200119518252971721448274846235879320362924206656971472493711107677598961463553324277826426691784458674010708635756004550789902368338633272118, 20217009574515126619724139485885721324936960849401637840860565569588595992087537454744066905387396266844236387315004915383456736142307523960394594650088663019228826091309049211780607761862663242437656610298243, 25534440916970201550118006203706860249111087748000550226680885431006136131742280963090650607632467666558508520152535105122661615376298673454198064361094319699307084117001019115669670029195171047304283891069792, 18871869316294018605789169171879572816494092699556970507058691345095743053290043643010965660058888064972257990750611470141816041727746767146945121588515830427165739580791663951175220638901672353681640741068573, 20173968537913641339915058056878181363456579537994317562789857397928196160113042659777558550242315788417022891612723148843142958668959046890197219991727894451795438138592005695329607326086644956073759609743066, 20601943394990265144021144365970164017319737300436518536503270346147112565303361487668388700369636611354280332841812324530501569200031186584749278453651172121161814207025650519637781007286435981682228528706305, 16397528630087028144645213166977866073543422560337716097539091258081008408890966764995645782823950721804205427713461441138000880478364026137452291234097219085473748076681729365744710225699866258812642458184750, 21373350333568141000876969785296802670776508778278005158047105058430550665787088265486222905402690421155861103648370249249790560185790723042867282734693553039477436055775198037042047438047898227097749354619822, 17767469767416052322357795736899648760868316512079849340028040817353808899589201201338152114229279980849491049574543361275046276135253417685681262008211582060955974064559129311524323185960856955462761555353091, 22148352529815091269441663541923247974004854058764556809596705832663604786920964849725772666340437231503146814919702525852955831173047034475925578238466977606367380212886384487294569287202762127531620290162734, 21663842528026621741414050256553652815372885707031383713657826718944735177083300302064509342116651731671570591336596953911570477161536730982887182434407761036442993588590230296643001682944654490645815177777455, 20219077358929317461660881724990436334639078047412693497584358963241840513748365548465302817975329987854784305275832045889690022909383530837382543579292451297269623663257098458645056099201050578472103957851128, 18255302182526662903763852563401346841065939531070045000414364747445988455597258924280193695407035356029557886165605853810182770534711966292253269625917149411889979307227493949293798772727125069093642134972336, 24926064145128749429079117171467042019887257504329103038171762786986349157515552927216574990423327013202735544601170247730647598931030432792167867343343213411600516855009788294067588153504026267213013591793027, 22369607314724468760253123915374991621544992437057652340350735935680183705467064876346663859696919167243522648029531700630202188671406298533187087292461774927340821192866797400987231509211718089237481902671100, 16994227117141934754898145294760231694287000959561775153135582047697469327393472840046006353260694322888486978811557952926229613247229990658445756595259401269267528233642142950389040647504583683489067768144570, 21758885458682118428357134100118546351270408335845311063139309657532131159530485845186953650675925931634290182806173575543561250369768935902929861898597396621656214490429009706989779345367262758413050071213624, 20156282616031755826700336845313823798147854495428660743884481573484471099887576514309769978525225369254700468742981099548840277532978306665910844928986235042420698332201264764734685502001234369189521332392642, 23291765247744127414491614915358658114280269483384022733002965612273627987872443453777028006606037159079637857473229879140366385523633075816362547967658930666106914269093225208138749470566410361196451552322613, 19807792217079652175713365065361659318870738952921195173619551645956745050506271953949139230097128034416815169649874760890189515620232505703162831090225715453502422905418824316957257395992121750661389503495033, 22074209373194902539215367382758486068533032275912313703269990627206774967653336496619231924013216321042649461711292555464574124714934511202231319963361912937842068483700298097209400217869036338644607607557860, 19678336511265998427322297909733474384702243426420286924671444552444079816707773485084891630780465895504253899943221044355971296122774264925882685351095921532685536165514189427245840338009573352081361238596378, 24746314790210393213546150322117518542380438001687269872679602687597595933350510598742749840102841364627647151669428936678130556027300886850086220074563664367409218038338623691372433831784916816798993162471163, 19346137206512895254202370018555139713690272833895195472766704715282164091959131850520571672509601848193468792313437642997923790118115476212663296111963644011010744006086847599108492279986468255445160241848708, 22739514514055088545643169404630736699361136323546717268615404574809011342622362833245601099992039789664042350284789853188040159950619203242924511038681127008964592137006103547262538912024671048254652547084347, 21491512279698208400974501713300096639215882495977078132548631606796810881149011161903684894826752520167909538856354238104288201344211604223297924253960199754326239113862002469224042442018978623149685130901455, 19381008151938129775129563507607725859173925946797075261437001349051037306091047611533900186593946739906685481456985573476863123716331923469386565432105662324849798182175616351721533048174745501978394238803081, 19965143096260141101824772370858657624912960190922708879345774507598595008331705725441057080530773097285721556537121282837594544143441953208783728710383586054502176671726097169651121269564738513585870857829805]
n, e = (73566307488763122580179867626252642940955298748752818919017828624963832700766915409125057515624347299603944790342215380220728964393071261454143348878369192979087090394858108255421841966688982884778999786076287493231499536762158941790933738200959195185310223268630105090119593363464568858268074382723204344819, 65537)
c = 30332590230153809507216298771130058954523332140754441956121305005101434036857592445870499808003492282406658682811671092885592290410570348283122359319554197485624784590315564056341976355615543224373344781813890901916269854242660708815123152440620383035798542275833361820196294814385622613621016771854846491244


L = block_matrix(ZZ,[
[1,Matrix(ZZ,hint2).T],
])
L = L.LLL()

M = []
for i in L:
if(i[-1] == 0):
M.append(i[:-1])
M = Matrix(ZZ,M)

Ker = M.right_kernel().basis()
Ker = Matrix(ZZ, Ker)
AB = Ker.LLL()

B = list(map(abs, AB[1]))
A = [i+j for i,j in zip(AB[0], B)]


p = GCD(n, hint2[0]*B[1]-hint2[1]*B[0])
q = n // p
print(long_to_bytes(int(pow(c, int(inverse(e,(p-1)*(q-1))), n))))

两位学长的做法与之类似,都是找了正交格,
不过未央手搓的求正交格的轮子还是蛮有意思的
1
2
3
4
5
6
7
8
9
10
def orthogonal_lattice(B):
_d, _n = B.nrows(), B.ncols()
_c = 2 ** min(((_n-1)/2+(_n-_d)*(_n-_d-1)/4),20) # this bound can be adjusted as needed
for b in B:
_c *= b.norm()
B_bot = (ceil(_c)*B).stack(identity_matrix(ZZ, _n))
B_r = B_bot.transpose().LLL()
LB = B_r.matrix_from_rows_and_columns(range(_n-_d), range(_d,_n+_d))
assert (B*LB.transpose()).is_zero()
return LB

这里也附上他的 exp
exp:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from sage.all import *

v = [18167664006612887319059224902765270796893002676833140278828762753019422055112981842474960489363321381703961075777458001649580900014422118323835566872616431879801196022002065870575408411392402196289546586784096, 16949724497872153018185454805056817009306460834363366674503445555601166063612534131218872220623085757598803471712484993846679917940676468400619280027766392891909311628455506176580754986432394780968152799110962, 17047826385266266053284093678595321710571075374778544212380847321745757838236659172906205102740667602435787521984776486971187349204170431714654733175622835939702945991530565925393793706654282009524471957119991, 25276634064427324410040718861523090738559926416024529567298785602258493027431468948039474136925591721164931318119534505838854361600391921633689344957912535216611716210525197658061038020595741600369400188538567, 22620929075309280405649238349357640303875210864208854217420509497788451366132889431240039164552611575528102978024292550959541449720371571757925105918051653777519219003404406299551822163574899163183356787743543, 20448555271367430173134759139565874060609709363893002188062221232670423900235907879442989619050874172750997684986786991784813276571714171675161047891339083833557999542955021257408958367084435326315450518847393, 16581432595661532600201978812720360650490725084571756108685801024225869509874266586101665454995626158761371202939602347462284734479523136008114543823450831433459621095011515966186441038409512845483898182330730, 23279853842002415904374433039119754653403309015190065311714877060259027498282160545851169991611095505190810819508498176947439317796919177899445232931519714386295909988604042659419915482267542524373950892662544, 16542280976863346138933938786694562410542429842169310231909671810291444369775133082891329676227328401108505520149711555594236523078258701726652736438397249153484528439336008442771240980575141952222517324476607, 17054798687400834881313828738161453727952686763495185341649729764826734928113560289710721893874591843482763545781022050238655346441049269145400183941816006501187555169759754496609909352066732267489240733143973, 22115728663051324710538517987151446287208882441569930705944807337542411196476967586630373946539021184108542887796299661200933395031919501574357288914028686562763621166172668808524981253976089963176915686295217, 19324745002425971121820837859939938858204545496254632010818159347041222757835937867307372949986924646040179923481350854019113237172710522847771842257888083088958980783122775860443475680302294211764812636993025, 17269103712436870749511150569030640471982622900104490728908671745662264368118790999669887094371008536628103283985205839448583011077421205589315164079023370873380480423797655480624151812894997816254147210406492, 17365467616785968410717969747207581822018195905573214322728668902230086291926193228235744513285718494565736538060677324971757810325341657627830082292794517994668597521842723473167615388674219621483061095351780, 20823988964903136690545608569993429386847299285019716840662662829134516039366335014168034963190410379384987535117127797097185441870894097973310130525700344822429616024795354496158261293140438037100429185280939, 19068742071797863698141529586788871165176403351706021832743114499444358327620104563127248492878047796963678668578417711317317649158855864613197342671267006688211460724339403654215571839421451060657330746917459, 20089639597210347757891251257684515181178224404350699015820324544431016085980542703447257134320668961280907495580251880177990935443438799776252979843969984270461013888122703933975001704404129130156833542263882, 22344734326131457204500487243249860924828673944521980798994250859372628295695660076289343998351448667548250129358262592043131205967592613289260998148991388190917863322690137458448696392344738292233285437662495, 22688858027824961235755458925538246922604928658660170686458395195714455094516952026243659139809095639584746977271909644938258445835519951859659822660413616465736923822988993362023001205350387354001389518742538, 21286046487289796335501643195437352334100195831127922478044197411293510360710188581314023052580692810484251118253550837525637065385439859631494533102244585493243972819369812352385425700028640641292410326514111, 21542729548465815605357067072323013570796657575603676418485975214641398139843537820643982914302122976789859817102498484496409546012119998359943274203338400776158986205776474024356567247508744784200354385060666, 22319592382753357951626314613193901130171847776829835028715915533809475362288873045184870972146269975570664009921662023590318988850871708674240304838922536028975978222603171333743353770676344328056539379240160, 25195209191944761648246874631038407055240893204894145709996399690807569652160721616011712739214434932639646688187304865397816188999592774874989401871300784534538762135830014255425391132306536883804201055992313, 18257804244956449160916107602212089869395886846990320452133193087611626919926796845263727422042179229606817439442521540784268169177331707314788427670112999551683927934427716554137597798283300120796277229509678, 20293403064916574136692432190836928681820834973375054705153628740577159076332283715581047503287766236543327123639746352358718218140738999496451259789097826888955418315455420948960832865750253988992454128969953, 15967654820584966012628708475666706277218484919923639492431538068059543232562431059752700377242326527417238151501168940191488179144049286512652111172149113549072003881460743035279388672984805823560897688895124, 25144187979876039024245879200325843092774389926620026124061775431569974232758799200333888039013494603721065709195353330350750055309315207499741437181094874894647736904055829877859906318073991986020178158776286, 15736932921640444103019961538951409924080453868073105830403926861058056351553271238438325117113945341892868641345117717666354739204401152657265824568724844930574396801692131746182948347887298330990039956813130, 18831072673439732764722762485733622234889447953507582396819704359771208236721692820362137219509611319088756045211407777880521726782697895768017460064889670066178710804124631128581556314122255564861269062385337, 23800437561684813552661749774840752013501533683948618798811470214669024646396165487093720960221009038817909066075238937189371227098032581450466402462014437421254375846263830927945343485988463525070074913720710, 24402191070622494792723290726249952159888270689258801831518209605331984684494095167423722682814769395395011136124403802097229547003802312444913008194461779426175966774202219703164060353710247619639616444797670, 20215481513831963554421686543560596857659844027486522940060791775984622049024173363533378455076109165728144576719015392033536498353094895564917644840994662704362121549525329105205514332808950206092190939931448, 18384453917605955747212560280232547481041600196031285084598132475801990710125754705645482436436531608696373462641765399622296314590071558616193035939108523357020287896879479452040171765916716377102454266933226, 21890401344164908103930010123434944359446535642544335610455613014563290097498740447164765588532234051104173227090428486681237432196639010849051113283297943367655458678533223039415083212229970648958070799280218, 18379893441293694747570620009241814202936873442370354246029979042247705730610190888710981918183390028386451290137755339890329474403224043675724851314770861939082447728194632548864823398818221526652331319263027, 18715827130228986951360013590464775001019026913384718876134449689773600060962392738619405370033085704046027397895627933844824630723286144367800484157574548819065406118338665931032779491897783504790669824301288, 13588739911708699123450670852772302012518315143187739886523841133752009403411431627334135210166268158490674049617489193734568451811305631563767138879895461211915128972052001136464325219117009268526575020143259, 18506039912943821193373920483847347155611306173368341979655092778147169768984477236224526786441466933360500418090210912574990962709452725122792963919616633389125605160796446674502416801964271004625701238202575, 22167985517547342184812919437069844889650448522260359154086923601900060998572245598167213217022051141570075284051615276464952346620430587694188548679895095556459804921016744713098882496174497693878187665372865, 21507363933875318987283059841465034113263466805329282129011688531718330888226928182985538861888698160675575993935166249701145994333840516459683763957425287811252135418288516497258724668090570720893589001392220, 20250321586608105267884665929443511322540360475552916143405651419034772061789298150974629817817611591100450468070842373341756704300393352252725859102426665187194754280129749402796746118608937061141768301995522, 16104259151024766025645778755951638093681273234415510444173981198301666343334808614748361662637508091511498829253677167171091582942780017355912433497214576425697459483727777273045993446283721290714044600814203, 14560242181138184594433372530956542527312169507277535425067427080573272033961044062335960097446781943943464713852520415535775461964590009720592053626735276833191667395201287169782350381649400286337671320581068, 16239347596615402699390026749150381714807445218767496868569282767673828662340774349530405347667558555781433774705139593469838946201218537641296949822639509296966092138954685186059819628696340121356660166937131, 21344472317634795288252811327141546596291633424850284492351783921599290478005814133560171828086405152298309169077585647189366292823613547973428250604674234857289341613448177246451956695700417432794886277704716, 16053809990112020217624905718566971288375815646771826941011489252522755953750669513046736360397030033178139614200701025268874379439106827823605937814395162011464610496629969260310816473733828751702925621950679, 18917855883623050190154989683327838135081813638430345099892537186954876489710857473326920009412778140451855952622686635694323466827034373114657023892484639238914593012175120540210780102536003758794571846502397, 22690171278715056779052233972642657173540399024770527983659216197108042021644328773010698851143953503599329885607621773816718008861742027388432534850163666629476315340137626681994316866368449548292328156728206, 21087818524872480052313215092436868441694786060866149491087132591272640372512484925209820065536439188250579925233059144898601140234767300574307770064543499923712729705795392684173268461519802573563186764326797, 18439753470094841291394543396785250736332596497190578058698960152415339036714664835925822942784700917586270640813663002161425694392259981974491535370706560550540525510875465091384383255081297963169390777475352, 20105719699015744146039374208926740159952318391171137544887868739518535254000803811729763681262304539724253518465850883904308979964535242371235415049403280585133993732946919550180260852767289669076362115454200, 17251599484976651171587511011045311555402088003441531674726612079301412643514474016351608797610153172169183504289799345382527665445027976807805594288914226822374523878290416047130731166794970645275146679838899, 23027331991437585896233907022469624030630702237261170259290872847355304456043379238362120518409085840638396736666056992747627271193089116095167049248270541979716594671069985183070290375121270398623215587207529, 18158149685496169798299129683009221264185608469410295069411669832919646968324946121757411511373498747604679198739125835462814352243797919744572086307939585501566092705355693015625009717017077302201663788208609, 18276153196656501517216055049560959047263892309902154534799806637704337317207294332426798932144785240877892837491213916540255237702169595754963908689566362060228840286531616263506272071630209104758589482803348, 19830654702835464289082520892939657653574451119898587213320188332842291005863699764597454403874285715252681820027919359194554863299385911740908952649966617784376852963552276558475217168696695867402522508290055, 15349828226638644963106414986240676364822261975534684137183044733508521003843559094515387144949811552173241406076270015291925943459603622043168219534080772937297911323165839870364550841685270125556125756627553, 20923687596111161976478930953796496927811701530608223491138786355445002217973253897724452954815797952200740069102515860924306246841340715110620719064010080520601890251137419840158983682372232110885549732743013, 21095748006022412831703352650023882351218414866517568822818298949510471554885207645049385966827210564667371665855668707424105040599599901165292360321667007968065708796593851653085339928947755081203265281357013, 20136320433636422315432754195821125224777716034031656342233368000257459497472596860252592531939146543685406198978058242599116859263546329669263543660114747385041549283367183026001454445297981439938401547228229, 16496919752274418275948572022974868132658743151124597724312835413857298109100258912203517423633396955060591787380445877361136405137884456764770035346437177846666365911942996404514058688909577420388537479730705, 13788728438272498164727737074811797093818033799836159894472736480763530670013682288670889124484670336660448907074673625466218166413315342420667608074179975422284472184048790475129281850298519112884101776426380, 24852871485448795332267345793743281093931161235481251209948049584749441451621572752080662697610253315331335180611651946374137068256112152253681972406000252076016099200912670370417045090034045383991812756120791, 18663346319122078996775762643035864683521213720864038756854558668694021987970601131985163948257100423991091156649638455828855082098689641225427227191064496066436196910238564311309556938903101074363279783438714, 21400068681031931459396470039651524575262457489792894764406364952394476440804779651233022862527636114968325782197380721095406628084183336358459476006267416033892771932528688312375109463803215034905281657962293, 16044158155847172030103761204572942507195578382208455423846603003318483484698088948486132040995746837257705704187725306831142305215342467016564452582165866039427184607605673304595194959499145031211096109534167, 16518253246325822837502418827700493807621067058438396395472266350036385535241769917459657069911028720968654253735107131282350340465691670072304718987805883113410923109703284511709226857412404454224134480632696, 22032469066601123287586507039704080058983969235246539501189720236880312024198451198788699002335010120658564926677243708367430773661097221076615953342733896063909953602379936312639192315223258556134958059637605, 17474611942177808070315948910226643697957069578572244709354155010512694059987765040746148981545760660371360975936526076852619987733316042847813177383519241505024635332293992920023420060610648140841369822739716, 20097265939024591617239874622716452182434300498447992668997438018575636772416262543204370899462096267444545094719202447520254303983442269757551626971917981420832391886214473318353984504467919530676605744560570, 18170251482705061226968041449812078923477452841162650888922564215790088545936753453513162197661916172215859504545409274440450807677845894292177296835154674774694992388033874349807244020099167681146357128785394, 18084007437523118129421476751918491055914528331902780911288404344016551650138679157754567938593688369062981279371320169939281882307797009116458871503759873023914718337944953764426183937635379280572434676575757, 17001811604221128900675671565539617923973183364469396458234914432162200119518252971721448274846235879320362924206656971472493711107677598961463553324277826426691784458674010708635756004550789902368338633272118, 20217009574515126619724139485885721324936960849401637840860565569588595992087537454744066905387396266844236387315004915383456736142307523960394594650088663019228826091309049211780607761862663242437656610298243, 25534440916970201550118006203706860249111087748000550226680885431006136131742280963090650607632467666558508520152535105122661615376298673454198064361094319699307084117001019115669670029195171047304283891069792, 18871869316294018605789169171879572816494092699556970507058691345095743053290043643010965660058888064972257990750611470141816041727746767146945121588515830427165739580791663951175220638901672353681640741068573, 20173968537913641339915058056878181363456579537994317562789857397928196160113042659777558550242315788417022891612723148843142958668959046890197219991727894451795438138592005695329607326086644956073759609743066, 20601943394990265144021144365970164017319737300436518536503270346147112565303361487668388700369636611354280332841812324530501569200031186584749278453651172121161814207025650519637781007286435981682228528706305, 16397528630087028144645213166977866073543422560337716097539091258081008408890966764995645782823950721804205427713461441138000880478364026137452291234097219085473748076681729365744710225699866258812642458184750, 21373350333568141000876969785296802670776508778278005158047105058430550665787088265486222905402690421155861103648370249249790560185790723042867282734693553039477436055775198037042047438047898227097749354619822, 17767469767416052322357795736899648760868316512079849340028040817353808899589201201338152114229279980849491049574543361275046276135253417685681262008211582060955974064559129311524323185960856955462761555353091, 22148352529815091269441663541923247974004854058764556809596705832663604786920964849725772666340437231503146814919702525852955831173047034475925578238466977606367380212886384487294569287202762127531620290162734, 21663842528026621741414050256553652815372885707031383713657826718944735177083300302064509342116651731671570591336596953911570477161536730982887182434407761036442993588590230296643001682944654490645815177777455, 20219077358929317461660881724990436334639078047412693497584358963241840513748365548465302817975329987854784305275832045889690022909383530837382543579292451297269623663257098458645056099201050578472103957851128, 18255302182526662903763852563401346841065939531070045000414364747445988455597258924280193695407035356029557886165605853810182770534711966292253269625917149411889979307227493949293798772727125069093642134972336, 24926064145128749429079117171467042019887257504329103038171762786986349157515552927216574990423327013202735544601170247730647598931030432792167867343343213411600516855009788294067588153504026267213013591793027, 22369607314724468760253123915374991621544992437057652340350735935680183705467064876346663859696919167243522648029531700630202188671406298533187087292461774927340821192866797400987231509211718089237481902671100, 16994227117141934754898145294760231694287000959561775153135582047697469327393472840046006353260694322888486978811557952926229613247229990658445756595259401269267528233642142950389040647504583683489067768144570, 21758885458682118428357134100118546351270408335845311063139309657532131159530485845186953650675925931634290182806173575543561250369768935902929861898597396621656214490429009706989779345367262758413050071213624, 20156282616031755826700336845313823798147854495428660743884481573484471099887576514309769978525225369254700468742981099548840277532978306665910844928986235042420698332201264764734685502001234369189521332392642, 23291765247744127414491614915358658114280269483384022733002965612273627987872443453777028006606037159079637857473229879140366385523633075816362547967658930666106914269093225208138749470566410361196451552322613, 19807792217079652175713365065361659318870738952921195173619551645956745050506271953949139230097128034416815169649874760890189515620232505703162831090225715453502422905418824316957257395992121750661389503495033, 22074209373194902539215367382758486068533032275912313703269990627206774967653336496619231924013216321042649461711292555464574124714934511202231319963361912937842068483700298097209400217869036338644607607557860, 19678336511265998427322297909733474384702243426420286924671444552444079816707773485084891630780465895504253899943221044355971296122774264925882685351095921532685536165514189427245840338009573352081361238596378, 24746314790210393213546150322117518542380438001687269872679602687597595933350510598742749840102841364627647151669428936678130556027300886850086220074563664367409218038338623691372433831784916816798993162471163, 19346137206512895254202370018555139713690272833895195472766704715282164091959131850520571672509601848193468792313437642997923790118115476212663296111963644011010744006086847599108492279986468255445160241848708, 22739514514055088545643169404630736699361136323546717268615404574809011342622362833245601099992039789664042350284789853188040159950619203242924511038681127008964592137006103547262538912024671048254652547084347, 21491512279698208400974501713300096639215882495977078132548631606796810881149011161903684894826752520167909538856354238104288201344211604223297924253960199754326239113862002469224042442018978623149685130901455, 19381008151938129775129563507607725859173925946797075261437001349051037306091047611533900186593946739906685481456985573476863123716331923469386565432105662324849798182175616351721533048174745501978394238803081, 19965143096260141101824772370858657624912960190922708879345774507598595008331705725441057080530773097285721556537121282837594544143441953208783728710383586054502176671726097169651121269564738513585870857829805]

def orthogonal_lattice(B):
_d, _n = B.nrows(), B.ncols()
_c = 2 ** min(((_n-1)/2+(_n-_d)*(_n-_d-1)/4),20) # this bound can be adjusted as needed
for b in B:
_c *= b.norm()
B_bot = (ceil(_c)*B).stack(identity_matrix(ZZ, _n))
B_r = B_bot.transpose().LLL()
LB = B_r.matrix_from_rows_and_columns(range(_n-_d), range(_d,_n+_d))
assert (B*LB.transpose()).is_zero()
return LB

from itertools import combinations

N, e = (73566307488763122580179867626252642940955298748752818919017828624963832700766915409125057515624347299603944790342215380220728964393071261454143348878369192979087090394858108255421841966688982884778999786076287493231499536762158941790933738200959195185310223268630105090119593363464568858268074382723204344819, 65537)

v = matrix(ZZ, v)
LB = orthogonal_lattice(v)
print(LB.nrows(), LB.ncols())
result = orthogonal_lattice(LB.matrix_from_rows(range(0, 100-2)))
print(result.nrows(), result.ncols())

possible_ab = []
for x, y in combinations(result, 2):
for a_ in range(-1, 2):
for b_ in range(-1, 2):
z = a_*x+b_*y
if z[0] < 0:
possible_ab.append(-z)
else:
possible_ab.append(z)

print(len(possible_ab))

for a, b in combinations(possible_ab, 2):
M = matrix(ZZ, [a, b])
try:
pq = M.solve_left(v)[0]
p, q = pq[0], pq[1]
if p * q == N:
print(p, q)
break
except:
continue

做法2:

正常的构造关系并使用 groebner 基进行优化
随意三个 hint 可以构造以下等式:

提出共有系数$a_1$,可以得到

得出的系数大概 360bits 左右
经过格规约出来的只是三个关系式,含有六个未知数,我们可以用 groebner 基进行约减
发现了类似$k_1a_1+k_2a_2+k_3a_3=0$的式子
然后继续 LLL 规约 $a_1,a_2,a_3$
中间有些细节需要小爆一下
最后通过 gcd 求出 p
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from sage.all import *
from Crypto.Util.number import *
clist = [18167664006612887319059224902765270796893002676833140278828762753019422055112981842474960489363321381703961075777458001649580900014422118323835566872616431879801196022002065870575408411392402196289546586784096, 16949724497872153018185454805056817009306460834363366674503445555601166063612534131218872220623085757598803471712484993846679917940676468400619280027766392891909311628455506176580754986432394780968152799110962, 17047826385266266053284093678595321710571075374778544212380847321745757838236659172906205102740667602435787521984776486971187349204170431714654733175622835939702945991530565925393793706654282009524471957119991, 25276634064427324410040718861523090738559926416024529567298785602258493027431468948039474136925591721164931318119534505838854361600391921633689344957912535216611716210525197658061038020595741600369400188538567, 22620929075309280405649238349357640303875210864208854217420509497788451366132889431240039164552611575528102978024292550959541449720371571757925105918051653777519219003404406299551822163574899163183356787743543, 20448555271367430173134759139565874060609709363893002188062221232670423900235907879442989619050874172750997684986786991784813276571714171675161047891339083833557999542955021257408958367084435326315450518847393, 16581432595661532600201978812720360650490725084571756108685801024225869509874266586101665454995626158761371202939602347462284734479523136008114543823450831433459621095011515966186441038409512845483898182330730, 23279853842002415904374433039119754653403309015190065311714877060259027498282160545851169991611095505190810819508498176947439317796919177899445232931519714386295909988604042659419915482267542524373950892662544, 16542280976863346138933938786694562410542429842169310231909671810291444369775133082891329676227328401108505520149711555594236523078258701726652736438397249153484528439336008442771240980575141952222517324476607, 17054798687400834881313828738161453727952686763495185341649729764826734928113560289710721893874591843482763545781022050238655346441049269145400183941816006501187555169759754496609909352066732267489240733143973, 22115728663051324710538517987151446287208882441569930705944807337542411196476967586630373946539021184108542887796299661200933395031919501574357288914028686562763621166172668808524981253976089963176915686295217, 19324745002425971121820837859939938858204545496254632010818159347041222757835937867307372949986924646040179923481350854019113237172710522847771842257888083088958980783122775860443475680302294211764812636993025, 17269103712436870749511150569030640471982622900104490728908671745662264368118790999669887094371008536628103283985205839448583011077421205589315164079023370873380480423797655480624151812894997816254147210406492, 17365467616785968410717969747207581822018195905573214322728668902230086291926193228235744513285718494565736538060677324971757810325341657627830082292794517994668597521842723473167615388674219621483061095351780, 20823988964903136690545608569993429386847299285019716840662662829134516039366335014168034963190410379384987535117127797097185441870894097973310130525700344822429616024795354496158261293140438037100429185280939, 19068742071797863698141529586788871165176403351706021832743114499444358327620104563127248492878047796963678668578417711317317649158855864613197342671267006688211460724339403654215571839421451060657330746917459, 20089639597210347757891251257684515181178224404350699015820324544431016085980542703447257134320668961280907495580251880177990935443438799776252979843969984270461013888122703933975001704404129130156833542263882, 22344734326131457204500487243249860924828673944521980798994250859372628295695660076289343998351448667548250129358262592043131205967592613289260998148991388190917863322690137458448696392344738292233285437662495, 22688858027824961235755458925538246922604928658660170686458395195714455094516952026243659139809095639584746977271909644938258445835519951859659822660413616465736923822988993362023001205350387354001389518742538, 21286046487289796335501643195437352334100195831127922478044197411293510360710188581314023052580692810484251118253550837525637065385439859631494533102244585493243972819369812352385425700028640641292410326514111, 21542729548465815605357067072323013570796657575603676418485975214641398139843537820643982914302122976789859817102498484496409546012119998359943274203338400776158986205776474024356567247508744784200354385060666, 22319592382753357951626314613193901130171847776829835028715915533809475362288873045184870972146269975570664009921662023590318988850871708674240304838922536028975978222603171333743353770676344328056539379240160, 25195209191944761648246874631038407055240893204894145709996399690807569652160721616011712739214434932639646688187304865397816188999592774874989401871300784534538762135830014255425391132306536883804201055992313, 18257804244956449160916107602212089869395886846990320452133193087611626919926796845263727422042179229606817439442521540784268169177331707314788427670112999551683927934427716554137597798283300120796277229509678, 20293403064916574136692432190836928681820834973375054705153628740577159076332283715581047503287766236543327123639746352358718218140738999496451259789097826888955418315455420948960832865750253988992454128969953, 15967654820584966012628708475666706277218484919923639492431538068059543232562431059752700377242326527417238151501168940191488179144049286512652111172149113549072003881460743035279388672984805823560897688895124, 25144187979876039024245879200325843092774389926620026124061775431569974232758799200333888039013494603721065709195353330350750055309315207499741437181094874894647736904055829877859906318073991986020178158776286, 15736932921640444103019961538951409924080453868073105830403926861058056351553271238438325117113945341892868641345117717666354739204401152657265824568724844930574396801692131746182948347887298330990039956813130, 18831072673439732764722762485733622234889447953507582396819704359771208236721692820362137219509611319088756045211407777880521726782697895768017460064889670066178710804124631128581556314122255564861269062385337, 23800437561684813552661749774840752013501533683948618798811470214669024646396165487093720960221009038817909066075238937189371227098032581450466402462014437421254375846263830927945343485988463525070074913720710, 24402191070622494792723290726249952159888270689258801831518209605331984684494095167423722682814769395395011136124403802097229547003802312444913008194461779426175966774202219703164060353710247619639616444797670, 20215481513831963554421686543560596857659844027486522940060791775984622049024173363533378455076109165728144576719015392033536498353094895564917644840994662704362121549525329105205514332808950206092190939931448, 18384453917605955747212560280232547481041600196031285084598132475801990710125754705645482436436531608696373462641765399622296314590071558616193035939108523357020287896879479452040171765916716377102454266933226, 21890401344164908103930010123434944359446535642544335610455613014563290097498740447164765588532234051104173227090428486681237432196639010849051113283297943367655458678533223039415083212229970648958070799280218, 18379893441293694747570620009241814202936873442370354246029979042247705730610190888710981918183390028386451290137755339890329474403224043675724851314770861939082447728194632548864823398818221526652331319263027, 18715827130228986951360013590464775001019026913384718876134449689773600060962392738619405370033085704046027397895627933844824630723286144367800484157574548819065406118338665931032779491897783504790669824301288, 13588739911708699123450670852772302012518315143187739886523841133752009403411431627334135210166268158490674049617489193734568451811305631563767138879895461211915128972052001136464325219117009268526575020143259, 18506039912943821193373920483847347155611306173368341979655092778147169768984477236224526786441466933360500418090210912574990962709452725122792963919616633389125605160796446674502416801964271004625701238202575, 22167985517547342184812919437069844889650448522260359154086923601900060998572245598167213217022051141570075284051615276464952346620430587694188548679895095556459804921016744713098882496174497693878187665372865, 21507363933875318987283059841465034113263466805329282129011688531718330888226928182985538861888698160675575993935166249701145994333840516459683763957425287811252135418288516497258724668090570720893589001392220, 20250321586608105267884665929443511322540360475552916143405651419034772061789298150974629817817611591100450468070842373341756704300393352252725859102426665187194754280129749402796746118608937061141768301995522, 16104259151024766025645778755951638093681273234415510444173981198301666343334808614748361662637508091511498829253677167171091582942780017355912433497214576425697459483727777273045993446283721290714044600814203, 14560242181138184594433372530956542527312169507277535425067427080573272033961044062335960097446781943943464713852520415535775461964590009720592053626735276833191667395201287169782350381649400286337671320581068, 16239347596615402699390026749150381714807445218767496868569282767673828662340774349530405347667558555781433774705139593469838946201218537641296949822639509296966092138954685186059819628696340121356660166937131, 21344472317634795288252811327141546596291633424850284492351783921599290478005814133560171828086405152298309169077585647189366292823613547973428250604674234857289341613448177246451956695700417432794886277704716, 16053809990112020217624905718566971288375815646771826941011489252522755953750669513046736360397030033178139614200701025268874379439106827823605937814395162011464610496629969260310816473733828751702925621950679, 18917855883623050190154989683327838135081813638430345099892537186954876489710857473326920009412778140451855952622686635694323466827034373114657023892484639238914593012175120540210780102536003758794571846502397, 22690171278715056779052233972642657173540399024770527983659216197108042021644328773010698851143953503599329885607621773816718008861742027388432534850163666629476315340137626681994316866368449548292328156728206, 21087818524872480052313215092436868441694786060866149491087132591272640372512484925209820065536439188250579925233059144898601140234767300574307770064543499923712729705795392684173268461519802573563186764326797, 18439753470094841291394543396785250736332596497190578058698960152415339036714664835925822942784700917586270640813663002161425694392259981974491535370706560550540525510875465091384383255081297963169390777475352, 20105719699015744146039374208926740159952318391171137544887868739518535254000803811729763681262304539724253518465850883904308979964535242371235415049403280585133993732946919550180260852767289669076362115454200, 17251599484976651171587511011045311555402088003441531674726612079301412643514474016351608797610153172169183504289799345382527665445027976807805594288914226822374523878290416047130731166794970645275146679838899, 23027331991437585896233907022469624030630702237261170259290872847355304456043379238362120518409085840638396736666056992747627271193089116095167049248270541979716594671069985183070290375121270398623215587207529, 18158149685496169798299129683009221264185608469410295069411669832919646968324946121757411511373498747604679198739125835462814352243797919744572086307939585501566092705355693015625009717017077302201663788208609, 18276153196656501517216055049560959047263892309902154534799806637704337317207294332426798932144785240877892837491213916540255237702169595754963908689566362060228840286531616263506272071630209104758589482803348, 19830654702835464289082520892939657653574451119898587213320188332842291005863699764597454403874285715252681820027919359194554863299385911740908952649966617784376852963552276558475217168696695867402522508290055, 15349828226638644963106414986240676364822261975534684137183044733508521003843559094515387144949811552173241406076270015291925943459603622043168219534080772937297911323165839870364550841685270125556125756627553, 20923687596111161976478930953796496927811701530608223491138786355445002217973253897724452954815797952200740069102515860924306246841340715110620719064010080520601890251137419840158983682372232110885549732743013, 21095748006022412831703352650023882351218414866517568822818298949510471554885207645049385966827210564667371665855668707424105040599599901165292360321667007968065708796593851653085339928947755081203265281357013, 20136320433636422315432754195821125224777716034031656342233368000257459497472596860252592531939146543685406198978058242599116859263546329669263543660114747385041549283367183026001454445297981439938401547228229, 16496919752274418275948572022974868132658743151124597724312835413857298109100258912203517423633396955060591787380445877361136405137884456764770035346437177846666365911942996404514058688909577420388537479730705, 13788728438272498164727737074811797093818033799836159894472736480763530670013682288670889124484670336660448907074673625466218166413315342420667608074179975422284472184048790475129281850298519112884101776426380, 24852871485448795332267345793743281093931161235481251209948049584749441451621572752080662697610253315331335180611651946374137068256112152253681972406000252076016099200912670370417045090034045383991812756120791, 18663346319122078996775762643035864683521213720864038756854558668694021987970601131985163948257100423991091156649638455828855082098689641225427227191064496066436196910238564311309556938903101074363279783438714, 21400068681031931459396470039651524575262457489792894764406364952394476440804779651233022862527636114968325782197380721095406628084183336358459476006267416033892771932528688312375109463803215034905281657962293, 16044158155847172030103761204572942507195578382208455423846603003318483484698088948486132040995746837257705704187725306831142305215342467016564452582165866039427184607605673304595194959499145031211096109534167, 16518253246325822837502418827700493807621067058438396395472266350036385535241769917459657069911028720968654253735107131282350340465691670072304718987805883113410923109703284511709226857412404454224134480632696, 22032469066601123287586507039704080058983969235246539501189720236880312024198451198788699002335010120658564926677243708367430773661097221076615953342733896063909953602379936312639192315223258556134958059637605, 17474611942177808070315948910226643697957069578572244709354155010512694059987765040746148981545760660371360975936526076852619987733316042847813177383519241505024635332293992920023420060610648140841369822739716, 20097265939024591617239874622716452182434300498447992668997438018575636772416262543204370899462096267444545094719202447520254303983442269757551626971917981420832391886214473318353984504467919530676605744560570, 18170251482705061226968041449812078923477452841162650888922564215790088545936753453513162197661916172215859504545409274440450807677845894292177296835154674774694992388033874349807244020099167681146357128785394, 18084007437523118129421476751918491055914528331902780911288404344016551650138679157754567938593688369062981279371320169939281882307797009116458871503759873023914718337944953764426183937635379280572434676575757, 17001811604221128900675671565539617923973183364469396458234914432162200119518252971721448274846235879320362924206656971472493711107677598961463553324277826426691784458674010708635756004550789902368338633272118, 20217009574515126619724139485885721324936960849401637840860565569588595992087537454744066905387396266844236387315004915383456736142307523960394594650088663019228826091309049211780607761862663242437656610298243, 25534440916970201550118006203706860249111087748000550226680885431006136131742280963090650607632467666558508520152535105122661615376298673454198064361094319699307084117001019115669670029195171047304283891069792, 18871869316294018605789169171879572816494092699556970507058691345095743053290043643010965660058888064972257990750611470141816041727746767146945121588515830427165739580791663951175220638901672353681640741068573, 20173968537913641339915058056878181363456579537994317562789857397928196160113042659777558550242315788417022891612723148843142958668959046890197219991727894451795438138592005695329607326086644956073759609743066, 20601943394990265144021144365970164017319737300436518536503270346147112565303361487668388700369636611354280332841812324530501569200031186584749278453651172121161814207025650519637781007286435981682228528706305, 16397528630087028144645213166977866073543422560337716097539091258081008408890966764995645782823950721804205427713461441138000880478364026137452291234097219085473748076681729365744710225699866258812642458184750, 21373350333568141000876969785296802670776508778278005158047105058430550665787088265486222905402690421155861103648370249249790560185790723042867282734693553039477436055775198037042047438047898227097749354619822, 17767469767416052322357795736899648760868316512079849340028040817353808899589201201338152114229279980849491049574543361275046276135253417685681262008211582060955974064559129311524323185960856955462761555353091, 22148352529815091269441663541923247974004854058764556809596705832663604786920964849725772666340437231503146814919702525852955831173047034475925578238466977606367380212886384487294569287202762127531620290162734, 21663842528026621741414050256553652815372885707031383713657826718944735177083300302064509342116651731671570591336596953911570477161536730982887182434407761036442993588590230296643001682944654490645815177777455, 20219077358929317461660881724990436334639078047412693497584358963241840513748365548465302817975329987854784305275832045889690022909383530837382543579292451297269623663257098458645056099201050578472103957851128, 18255302182526662903763852563401346841065939531070045000414364747445988455597258924280193695407035356029557886165605853810182770534711966292253269625917149411889979307227493949293798772727125069093642134972336, 24926064145128749429079117171467042019887257504329103038171762786986349157515552927216574990423327013202735544601170247730647598931030432792167867343343213411600516855009788294067588153504026267213013591793027, 22369607314724468760253123915374991621544992437057652340350735935680183705467064876346663859696919167243522648029531700630202188671406298533187087292461774927340821192866797400987231509211718089237481902671100, 16994227117141934754898145294760231694287000959561775153135582047697469327393472840046006353260694322888486978811557952926229613247229990658445756595259401269267528233642142950389040647504583683489067768144570, 21758885458682118428357134100118546351270408335845311063139309657532131159530485845186953650675925931634290182806173575543561250369768935902929861898597396621656214490429009706989779345367262758413050071213624, 20156282616031755826700336845313823798147854495428660743884481573484471099887576514309769978525225369254700468742981099548840277532978306665910844928986235042420698332201264764734685502001234369189521332392642, 23291765247744127414491614915358658114280269483384022733002965612273627987872443453777028006606037159079637857473229879140366385523633075816362547967658930666106914269093225208138749470566410361196451552322613, 19807792217079652175713365065361659318870738952921195173619551645956745050506271953949139230097128034416815169649874760890189515620232505703162831090225715453502422905418824316957257395992121750661389503495033, 22074209373194902539215367382758486068533032275912313703269990627206774967653336496619231924013216321042649461711292555464574124714934511202231319963361912937842068483700298097209400217869036338644607607557860, 19678336511265998427322297909733474384702243426420286924671444552444079816707773485084891630780465895504253899943221044355971296122774264925882685351095921532685536165514189427245840338009573352081361238596378, 24746314790210393213546150322117518542380438001687269872679602687597595933350510598742749840102841364627647151669428936678130556027300886850086220074563664367409218038338623691372433831784916816798993162471163, 19346137206512895254202370018555139713690272833895195472766704715282164091959131850520571672509601848193468792313437642997923790118115476212663296111963644011010744006086847599108492279986468255445160241848708, 22739514514055088545643169404630736699361136323546717268615404574809011342622362833245601099992039789664042350284789853188040159950619203242924511038681127008964592137006103547262538912024671048254652547084347, 21491512279698208400974501713300096639215882495977078132548631606796810881149011161903684894826752520167909538856354238104288201344211604223297924253960199754326239113862002469224042442018978623149685130901455, 19381008151938129775129563507607725859173925946797075261437001349051037306091047611533900186593946739906685481456985573476863123716331923469386565432105662324849798182175616351721533048174745501978394238803081, 19965143096260141101824772370858657624912960190922708879345774507598595008331705725441057080530773097285721556537121282837594544143441953208783728710383586054502176671726097169651121269564738513585870857829805]
public_key2 = (73566307488763122580179867626252642940955298748752818919017828624963832700766915409125057515624347299603944790342215380220728964393071261454143348878369192979087090394858108255421841966688982884778999786076287493231499536762158941790933738200959195185310223268630105090119593363464568858268074382723204344819, 65537)
enc2 = 30332590230153809507216298771130058954523332140754441956121305005101434036857592445870499808003492282406658682811671092885592290410570348283122359319554197485624784590315564056341976355615543224373344781813890901916269854242660708815123152440620383035798542275833361820196294814385622613621016771854846491244
n2=public_key2[0]
from re import findall
from subprocess import check_output
from itertools import *


h = clist
nums = 98
L = Matrix(ZZ, 1+nums*2, 1+nums*3)
for i in range(1+nums*2):
L[i,i] = 1
for i in range(nums):
L[0,1+nums*2+i] = h[i+2]
L[2*i+1,1+nums*2+i] = h[0]
L[2*i+2,1+nums*2+i] = h[1]
L[:,-nums:] *= 2**512
L = L.LLL()

v,t,u = L[0,0],L[0,1],L[0,2]
a1s, a2s, a3s, b1s, b2s, b3s = QQ["a1,a2,a3,b1,b2,b3"].gens()
for sign in product((-1, 1), repeat=3):
I = ideal(
[
a3s * b2s - a2s * b3s + sign[0] * t,
a3s * b1s - a1s * b3s + sign[1] * u,
a2s * b1s - a1s * b2s + sign[2] * v,
]
)
if I.dimension() != -1:
print(sign)
print("dim", I.dimension())
def step2(f):
# this f is in the form of k1*a1+k2*a2+k3*a3==0
# for some reason, k1*b1+k2*b2+k3*b3==0 also holds
# use LLL to find it
print("=" * 40)
print(f)
L = matrix(f.coefficients()).T.augment(matrix.identity(3))
L[:, 0] *= n2
L = L.LLL()
print(L[0])
print(L[1])
v1 = L[0]
v2 = L[1]
xs = []
for c1, c2 in product((-2, -1, 0, 1, 2), repeat=2):
v = c1 * v1 + c2 * v2
_, x1, x2, x3 = v
if all([0 <= x <= 2**180 for x in (x1, x2, x3)]):
xs.append((x1, x2, x3))
# we don't know which one is correct pair of (a1, a2, a3) and (b1, b2, b3)
# just try all combinations
for g1, g2 in combinations(xs, 2):
a1r, a2r, a3r = g1
b1r, b2r, b3r = g2
q = gcd(a2r * h[0] - a1r * h[1], n2)
if 1 < q < n2:
p = n2 // q
e = 0x10001
d = inverse_mod(e, (p - 1) * (q - 1))
m = pow(enc2, d, n2)
flag = int(m).to_bytes(1024, "big").strip(b"\x00")
print(p,flag)
exit()

step2(I.groebner_basis()[1])

stage3

根据题干可知

可以构造出如下等式

展开得到

其实这步也可以用 groenber_basis 得到同样的结果
$c_1$和$c_2$已知, p,q 接近模数的一半,于是可以小爆加 LLL 解决

exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from Crypto.Util.number import *
from sage.all import *
#stage3
hint3 = (68510878638370415044742935889020774276546916983689799210290582093686515377232591362560941306242501220803210859757512468762736941602749345887425082831572206675493389611203432014126644550502117937044804472954180498370676609819898980996282130652627551615825721459553747074503843556784456297882411861526590080037, 117882651978564762717266768251008799169262849451887398128580060795377656792158234083843539818050019451797822782621312362313232759168181582387488893534974006037142066091872636582259199644094998729866484138566711846974126209431468102938252566414322631620261045488855395390985797791782549179665864885691057222752)
n3,e3 = (94789409892878223843496496113047481402435455468813255092840207010463661854593919772268992045955100688692872116996741724352837555794276141314552518390800907711192442516993891316013640874154318671978150702691578926912235318405120588096104222702992868492960182477857526176600665556671704106974346372234964363581, 65537)
enc3 = 17737974772490835017139672507261082238806983528533357501033270577311227414618940490226102450232473366793815933753927943027643033829459416623683596533955075569578787574561297243060958714055785089716571943663350360324047532058597960949979894090400134473940587235634842078030727691627400903239810993936770281755
c1,c2 = hint3

brute = 2
for i in range(2^brute):
for j in range(2^brute):
L = Matrix(ZZ, [
[1,0,0,2^brute*c1],
[0,1,0,2^brute*c2],
[0,0,2^(512-brute),c1*i+c2*j-c1*c2],
[0,0,0,n3]
])
L[:,-1:] *= n3
res = L.LLL()[0]

p = 2^brute*abs(res[0])+i
if(n3 % p == 0):
print(p)

exp:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
from sage.all import * 
from Crypto.Util.number import *
from sympy import symbols,solve
from random import randint
from itertools import product, combinations
#stage1
hints = 18978581186415161964839647137704633944599150543420658500585655372831779670338724440572792208984183863860898382564328183868786589851370156024615630835636170
public_key = (89839084450618055007900277736741312641844770591346432583302975236097465068572445589385798822593889266430563039645335037061240101688433078717811590377686465973797658355984717210228739793741484666628342039127345855467748247485016133560729063901396973783754780048949709195334690395217112330585431653872523325589, 65537)
enc1 = 23664702267463524872340419776983638860234156620934868573173546937679196743146691156369928738109129704387312263842088573122121751421709842579634121187349747424486233111885687289480494785285701709040663052248336541918235910988178207506008430080621354232140617853327942136965075461701008744432418773880574136247
n1=public_key[0]
e1=public_key[1]
p,q=symbols('p q')
eq1=p+q-hints
eq2=p*q-n1
solutions=solve([eq1,eq2],p,q)
p1=int(solutions[0][0])
q1=int(solutions[0][1])
d1=inverse(e1,(p1-1)*(q1-1))
flag1=long_to_bytes(pow(enc1,d1,n1))
print(flag1)
#stage2
hints2 = [18167664006612887319059224902765270796893002676833140278828762753019422055112981842474960489363321381703961075777458001649580900014422118323835566872616431879801196022002065870575408411392402196289546586784096, 16949724497872153018185454805056817009306460834363366674503445555601166063612534131218872220623085757598803471712484993846679917940676468400619280027766392891909311628455506176580754986432394780968152799110962, 17047826385266266053284093678595321710571075374778544212380847321745757838236659172906205102740667602435787521984776486971187349204170431714654733175622835939702945991530565925393793706654282009524471957119991, 25276634064427324410040718861523090738559926416024529567298785602258493027431468948039474136925591721164931318119534505838854361600391921633689344957912535216611716210525197658061038020595741600369400188538567, 22620929075309280405649238349357640303875210864208854217420509497788451366132889431240039164552611575528102978024292550959541449720371571757925105918051653777519219003404406299551822163574899163183356787743543, 20448555271367430173134759139565874060609709363893002188062221232670423900235907879442989619050874172750997684986786991784813276571714171675161047891339083833557999542955021257408958367084435326315450518847393, 16581432595661532600201978812720360650490725084571756108685801024225869509874266586101665454995626158761371202939602347462284734479523136008114543823450831433459621095011515966186441038409512845483898182330730, 23279853842002415904374433039119754653403309015190065311714877060259027498282160545851169991611095505190810819508498176947439317796919177899445232931519714386295909988604042659419915482267542524373950892662544, 16542280976863346138933938786694562410542429842169310231909671810291444369775133082891329676227328401108505520149711555594236523078258701726652736438397249153484528439336008442771240980575141952222517324476607, 17054798687400834881313828738161453727952686763495185341649729764826734928113560289710721893874591843482763545781022050238655346441049269145400183941816006501187555169759754496609909352066732267489240733143973, 22115728663051324710538517987151446287208882441569930705944807337542411196476967586630373946539021184108542887796299661200933395031919501574357288914028686562763621166172668808524981253976089963176915686295217, 19324745002425971121820837859939938858204545496254632010818159347041222757835937867307372949986924646040179923481350854019113237172710522847771842257888083088958980783122775860443475680302294211764812636993025, 17269103712436870749511150569030640471982622900104490728908671745662264368118790999669887094371008536628103283985205839448583011077421205589315164079023370873380480423797655480624151812894997816254147210406492, 17365467616785968410717969747207581822018195905573214322728668902230086291926193228235744513285718494565736538060677324971757810325341657627830082292794517994668597521842723473167615388674219621483061095351780, 20823988964903136690545608569993429386847299285019716840662662829134516039366335014168034963190410379384987535117127797097185441870894097973310130525700344822429616024795354496158261293140438037100429185280939, 19068742071797863698141529586788871165176403351706021832743114499444358327620104563127248492878047796963678668578417711317317649158855864613197342671267006688211460724339403654215571839421451060657330746917459, 20089639597210347757891251257684515181178224404350699015820324544431016085980542703447257134320668961280907495580251880177990935443438799776252979843969984270461013888122703933975001704404129130156833542263882, 22344734326131457204500487243249860924828673944521980798994250859372628295695660076289343998351448667548250129358262592043131205967592613289260998148991388190917863322690137458448696392344738292233285437662495, 22688858027824961235755458925538246922604928658660170686458395195714455094516952026243659139809095639584746977271909644938258445835519951859659822660413616465736923822988993362023001205350387354001389518742538, 21286046487289796335501643195437352334100195831127922478044197411293510360710188581314023052580692810484251118253550837525637065385439859631494533102244585493243972819369812352385425700028640641292410326514111, 21542729548465815605357067072323013570796657575603676418485975214641398139843537820643982914302122976789859817102498484496409546012119998359943274203338400776158986205776474024356567247508744784200354385060666, 22319592382753357951626314613193901130171847776829835028715915533809475362288873045184870972146269975570664009921662023590318988850871708674240304838922536028975978222603171333743353770676344328056539379240160, 25195209191944761648246874631038407055240893204894145709996399690807569652160721616011712739214434932639646688187304865397816188999592774874989401871300784534538762135830014255425391132306536883804201055992313, 18257804244956449160916107602212089869395886846990320452133193087611626919926796845263727422042179229606817439442521540784268169177331707314788427670112999551683927934427716554137597798283300120796277229509678, 20293403064916574136692432190836928681820834973375054705153628740577159076332283715581047503287766236543327123639746352358718218140738999496451259789097826888955418315455420948960832865750253988992454128969953, 15967654820584966012628708475666706277218484919923639492431538068059543232562431059752700377242326527417238151501168940191488179144049286512652111172149113549072003881460743035279388672984805823560897688895124, 25144187979876039024245879200325843092774389926620026124061775431569974232758799200333888039013494603721065709195353330350750055309315207499741437181094874894647736904055829877859906318073991986020178158776286, 15736932921640444103019961538951409924080453868073105830403926861058056351553271238438325117113945341892868641345117717666354739204401152657265824568724844930574396801692131746182948347887298330990039956813130, 18831072673439732764722762485733622234889447953507582396819704359771208236721692820362137219509611319088756045211407777880521726782697895768017460064889670066178710804124631128581556314122255564861269062385337, 23800437561684813552661749774840752013501533683948618798811470214669024646396165487093720960221009038817909066075238937189371227098032581450466402462014437421254375846263830927945343485988463525070074913720710, 24402191070622494792723290726249952159888270689258801831518209605331984684494095167423722682814769395395011136124403802097229547003802312444913008194461779426175966774202219703164060353710247619639616444797670, 20215481513831963554421686543560596857659844027486522940060791775984622049024173363533378455076109165728144576719015392033536498353094895564917644840994662704362121549525329105205514332808950206092190939931448, 18384453917605955747212560280232547481041600196031285084598132475801990710125754705645482436436531608696373462641765399622296314590071558616193035939108523357020287896879479452040171765916716377102454266933226, 21890401344164908103930010123434944359446535642544335610455613014563290097498740447164765588532234051104173227090428486681237432196639010849051113283297943367655458678533223039415083212229970648958070799280218, 18379893441293694747570620009241814202936873442370354246029979042247705730610190888710981918183390028386451290137755339890329474403224043675724851314770861939082447728194632548864823398818221526652331319263027, 18715827130228986951360013590464775001019026913384718876134449689773600060962392738619405370033085704046027397895627933844824630723286144367800484157574548819065406118338665931032779491897783504790669824301288, 13588739911708699123450670852772302012518315143187739886523841133752009403411431627334135210166268158490674049617489193734568451811305631563767138879895461211915128972052001136464325219117009268526575020143259, 18506039912943821193373920483847347155611306173368341979655092778147169768984477236224526786441466933360500418090210912574990962709452725122792963919616633389125605160796446674502416801964271004625701238202575, 22167985517547342184812919437069844889650448522260359154086923601900060998572245598167213217022051141570075284051615276464952346620430587694188548679895095556459804921016744713098882496174497693878187665372865, 21507363933875318987283059841465034113263466805329282129011688531718330888226928182985538861888698160675575993935166249701145994333840516459683763957425287811252135418288516497258724668090570720893589001392220, 20250321586608105267884665929443511322540360475552916143405651419034772061789298150974629817817611591100450468070842373341756704300393352252725859102426665187194754280129749402796746118608937061141768301995522, 16104259151024766025645778755951638093681273234415510444173981198301666343334808614748361662637508091511498829253677167171091582942780017355912433497214576425697459483727777273045993446283721290714044600814203, 14560242181138184594433372530956542527312169507277535425067427080573272033961044062335960097446781943943464713852520415535775461964590009720592053626735276833191667395201287169782350381649400286337671320581068, 16239347596615402699390026749150381714807445218767496868569282767673828662340774349530405347667558555781433774705139593469838946201218537641296949822639509296966092138954685186059819628696340121356660166937131, 21344472317634795288252811327141546596291633424850284492351783921599290478005814133560171828086405152298309169077585647189366292823613547973428250604674234857289341613448177246451956695700417432794886277704716, 16053809990112020217624905718566971288375815646771826941011489252522755953750669513046736360397030033178139614200701025268874379439106827823605937814395162011464610496629969260310816473733828751702925621950679, 18917855883623050190154989683327838135081813638430345099892537186954876489710857473326920009412778140451855952622686635694323466827034373114657023892484639238914593012175120540210780102536003758794571846502397, 22690171278715056779052233972642657173540399024770527983659216197108042021644328773010698851143953503599329885607621773816718008861742027388432534850163666629476315340137626681994316866368449548292328156728206, 21087818524872480052313215092436868441694786060866149491087132591272640372512484925209820065536439188250579925233059144898601140234767300574307770064543499923712729705795392684173268461519802573563186764326797, 18439753470094841291394543396785250736332596497190578058698960152415339036714664835925822942784700917586270640813663002161425694392259981974491535370706560550540525510875465091384383255081297963169390777475352, 20105719699015744146039374208926740159952318391171137544887868739518535254000803811729763681262304539724253518465850883904308979964535242371235415049403280585133993732946919550180260852767289669076362115454200, 17251599484976651171587511011045311555402088003441531674726612079301412643514474016351608797610153172169183504289799345382527665445027976807805594288914226822374523878290416047130731166794970645275146679838899, 23027331991437585896233907022469624030630702237261170259290872847355304456043379238362120518409085840638396736666056992747627271193089116095167049248270541979716594671069985183070290375121270398623215587207529, 18158149685496169798299129683009221264185608469410295069411669832919646968324946121757411511373498747604679198739125835462814352243797919744572086307939585501566092705355693015625009717017077302201663788208609, 18276153196656501517216055049560959047263892309902154534799806637704337317207294332426798932144785240877892837491213916540255237702169595754963908689566362060228840286531616263506272071630209104758589482803348, 19830654702835464289082520892939657653574451119898587213320188332842291005863699764597454403874285715252681820027919359194554863299385911740908952649966617784376852963552276558475217168696695867402522508290055, 15349828226638644963106414986240676364822261975534684137183044733508521003843559094515387144949811552173241406076270015291925943459603622043168219534080772937297911323165839870364550841685270125556125756627553, 20923687596111161976478930953796496927811701530608223491138786355445002217973253897724452954815797952200740069102515860924306246841340715110620719064010080520601890251137419840158983682372232110885549732743013, 21095748006022412831703352650023882351218414866517568822818298949510471554885207645049385966827210564667371665855668707424105040599599901165292360321667007968065708796593851653085339928947755081203265281357013, 20136320433636422315432754195821125224777716034031656342233368000257459497472596860252592531939146543685406198978058242599116859263546329669263543660114747385041549283367183026001454445297981439938401547228229, 16496919752274418275948572022974868132658743151124597724312835413857298109100258912203517423633396955060591787380445877361136405137884456764770035346437177846666365911942996404514058688909577420388537479730705, 13788728438272498164727737074811797093818033799836159894472736480763530670013682288670889124484670336660448907074673625466218166413315342420667608074179975422284472184048790475129281850298519112884101776426380, 24852871485448795332267345793743281093931161235481251209948049584749441451621572752080662697610253315331335180611651946374137068256112152253681972406000252076016099200912670370417045090034045383991812756120791, 18663346319122078996775762643035864683521213720864038756854558668694021987970601131985163948257100423991091156649638455828855082098689641225427227191064496066436196910238564311309556938903101074363279783438714, 21400068681031931459396470039651524575262457489792894764406364952394476440804779651233022862527636114968325782197380721095406628084183336358459476006267416033892771932528688312375109463803215034905281657962293, 16044158155847172030103761204572942507195578382208455423846603003318483484698088948486132040995746837257705704187725306831142305215342467016564452582165866039427184607605673304595194959499145031211096109534167, 16518253246325822837502418827700493807621067058438396395472266350036385535241769917459657069911028720968654253735107131282350340465691670072304718987805883113410923109703284511709226857412404454224134480632696, 22032469066601123287586507039704080058983969235246539501189720236880312024198451198788699002335010120658564926677243708367430773661097221076615953342733896063909953602379936312639192315223258556134958059637605, 17474611942177808070315948910226643697957069578572244709354155010512694059987765040746148981545760660371360975936526076852619987733316042847813177383519241505024635332293992920023420060610648140841369822739716, 20097265939024591617239874622716452182434300498447992668997438018575636772416262543204370899462096267444545094719202447520254303983442269757551626971917981420832391886214473318353984504467919530676605744560570, 18170251482705061226968041449812078923477452841162650888922564215790088545936753453513162197661916172215859504545409274440450807677845894292177296835154674774694992388033874349807244020099167681146357128785394, 18084007437523118129421476751918491055914528331902780911288404344016551650138679157754567938593688369062981279371320169939281882307797009116458871503759873023914718337944953764426183937635379280572434676575757, 17001811604221128900675671565539617923973183364469396458234914432162200119518252971721448274846235879320362924206656971472493711107677598961463553324277826426691784458674010708635756004550789902368338633272118, 20217009574515126619724139485885721324936960849401637840860565569588595992087537454744066905387396266844236387315004915383456736142307523960394594650088663019228826091309049211780607761862663242437656610298243, 25534440916970201550118006203706860249111087748000550226680885431006136131742280963090650607632467666558508520152535105122661615376298673454198064361094319699307084117001019115669670029195171047304283891069792, 18871869316294018605789169171879572816494092699556970507058691345095743053290043643010965660058888064972257990750611470141816041727746767146945121588515830427165739580791663951175220638901672353681640741068573, 20173968537913641339915058056878181363456579537994317562789857397928196160113042659777558550242315788417022891612723148843142958668959046890197219991727894451795438138592005695329607326086644956073759609743066, 20601943394990265144021144365970164017319737300436518536503270346147112565303361487668388700369636611354280332841812324530501569200031186584749278453651172121161814207025650519637781007286435981682228528706305, 16397528630087028144645213166977866073543422560337716097539091258081008408890966764995645782823950721804205427713461441138000880478364026137452291234097219085473748076681729365744710225699866258812642458184750, 21373350333568141000876969785296802670776508778278005158047105058430550665787088265486222905402690421155861103648370249249790560185790723042867282734693553039477436055775198037042047438047898227097749354619822, 17767469767416052322357795736899648760868316512079849340028040817353808899589201201338152114229279980849491049574543361275046276135253417685681262008211582060955974064559129311524323185960856955462761555353091, 22148352529815091269441663541923247974004854058764556809596705832663604786920964849725772666340437231503146814919702525852955831173047034475925578238466977606367380212886384487294569287202762127531620290162734, 21663842528026621741414050256553652815372885707031383713657826718944735177083300302064509342116651731671570591336596953911570477161536730982887182434407761036442993588590230296643001682944654490645815177777455, 20219077358929317461660881724990436334639078047412693497584358963241840513748365548465302817975329987854784305275832045889690022909383530837382543579292451297269623663257098458645056099201050578472103957851128, 18255302182526662903763852563401346841065939531070045000414364747445988455597258924280193695407035356029557886165605853810182770534711966292253269625917149411889979307227493949293798772727125069093642134972336, 24926064145128749429079117171467042019887257504329103038171762786986349157515552927216574990423327013202735544601170247730647598931030432792167867343343213411600516855009788294067588153504026267213013591793027, 22369607314724468760253123915374991621544992437057652340350735935680183705467064876346663859696919167243522648029531700630202188671406298533187087292461774927340821192866797400987231509211718089237481902671100, 16994227117141934754898145294760231694287000959561775153135582047697469327393472840046006353260694322888486978811557952926229613247229990658445756595259401269267528233642142950389040647504583683489067768144570, 21758885458682118428357134100118546351270408335845311063139309657532131159530485845186953650675925931634290182806173575543561250369768935902929861898597396621656214490429009706989779345367262758413050071213624, 20156282616031755826700336845313823798147854495428660743884481573484471099887576514309769978525225369254700468742981099548840277532978306665910844928986235042420698332201264764734685502001234369189521332392642, 23291765247744127414491614915358658114280269483384022733002965612273627987872443453777028006606037159079637857473229879140366385523633075816362547967658930666106914269093225208138749470566410361196451552322613, 19807792217079652175713365065361659318870738952921195173619551645956745050506271953949139230097128034416815169649874760890189515620232505703162831090225715453502422905418824316957257395992121750661389503495033, 22074209373194902539215367382758486068533032275912313703269990627206774967653336496619231924013216321042649461711292555464574124714934511202231319963361912937842068483700298097209400217869036338644607607557860, 19678336511265998427322297909733474384702243426420286924671444552444079816707773485084891630780465895504253899943221044355971296122774264925882685351095921532685536165514189427245840338009573352081361238596378, 24746314790210393213546150322117518542380438001687269872679602687597595933350510598742749840102841364627647151669428936678130556027300886850086220074563664367409218038338623691372433831784916816798993162471163, 19346137206512895254202370018555139713690272833895195472766704715282164091959131850520571672509601848193468792313437642997923790118115476212663296111963644011010744006086847599108492279986468255445160241848708, 22739514514055088545643169404630736699361136323546717268615404574809011342622362833245601099992039789664042350284789853188040159950619203242924511038681127008964592137006103547262538912024671048254652547084347, 21491512279698208400974501713300096639215882495977078132548631606796810881149011161903684894826752520167909538856354238104288201344211604223297924253960199754326239113862002469224042442018978623149685130901455, 19381008151938129775129563507607725859173925946797075261437001349051037306091047611533900186593946739906685481456985573476863123716331923469386565432105662324849798182175616351721533048174745501978394238803081, 19965143096260141101824772370858657624912960190922708879345774507598595008331705725441057080530773097285721556537121282837594544143441953208783728710383586054502176671726097169651121269564738513585870857829805]
public_key2 = (73566307488763122580179867626252642940955298748752818919017828624963832700766915409125057515624347299603944790342215380220728964393071261454143348878369192979087090394858108255421841966688982884778999786076287493231499536762158941790933738200959195185310223268630105090119593363464568858268074382723204344819, 65537)
enc2 = 30332590230153809507216298771130058954523332140754441956121305005101434036857592445870499808003492282406658682811671092885592290410570348283122359319554197485624784590315564056341976355615543224373344781813890901916269854242660708815123152440620383035798542275833361820196294814385622613621016771854846491244
h1=hints2[23]
h2=hints2[1]
h3=hints2[5]
h4=hints2[33]
n=public_key2[0]
e=public_key2[1]
import itertools
hints=hints2[0:4]
V = hints
k = 2**800
M = Matrix.column([k * v for v in V]).augment(Matrix.identity(len(V)))
B = [b[1:] for b in M.LLL()]
M = (k * Matrix(B[:len(V)-2])).T.augment(Matrix.identity(len(V)))
B = [b[-len(V):] for b in M.LLL() if set(b[:len(V)-2]) == {0}]
p1=735663074887631225801798676262526429409552987487528189190178286249638327007669154091250575156243472996039447903422153802207289643930712614541433488783691929790870903948581
print(p1.bit_length())
for s, t in itertools.product(range(4), repeat=2):
T = s*B[0] + t*B[1]
a1, a2, a3,a4 = T
kq = gcd(a1 * hints[1] - a2 * hints[0], n)
if 1 < kq < n:
print('find!', kq, s, t)
break
for i in range(2**16, 1, -1):
if kq % i == 0:
kq //= i
q = int(kq)
p = int(n // kq)
print(p)
print(q)
d = pow(0x10001, -1, (p - 1) * (q - 1))
m = pow(enc2, d, n)
flag2= long_to_bytes(m)

p=8112940945910485817171807897687451701452029959677470272197529542411816926233172848066074195817612280582244564398252967013953964546888998662975298338523549
q=9067773077510925207378520309595658022345214442920360440202890774224295250116442048990578009377300541280465330975931465993745130297479191298485033569345231
enc3 = 17737974772490835017139672507261082238806983528533357501033270577311227414618940490226102450232473366793815933753927943027643033829459416623683596533955075569578787574561297243060958714055785089716571943663350360324047532058597960949979894090400134473940587235634842078030727691627400903239810993936770281755
flag3=long_to_bytes(pow(enc3,d,n))
flag=flag1+flag2+flag3
print(flag)
'''
load('https://gist.githubusercontent.com/Connor-McCartney/952583ecac836f843f50b785c7cb283d/raw/5718ebd8c9b4f9a549746094877a97e7796752eb/solvelinmod.py')
hints3 = (68510878638370415044742935889020774276546916983689799210290582093686515377232591362560941306242501220803210859757512468762736941602749345887425082831572206675493389611203432014126644550502117937044804472954180498370676609819898980996282130652627551615825721459553747074503843556784456297882411861526590080037, 117882651978564762717266768251008799169262849451887398128580060795377656792158234083843539818050019451797822782621312362313232759168181582387488893534974006037142066091872636582259199644094998729866484138566711846974126209431468102938252566414322631620261045488855395390985797791782549179665864885691057222752)
public_key3 = (94789409892878223843496496113047481402435455468813255092840207010463661854593919772268992045955100688692872116996741724352837555794276141314552518390800907711192442516993891316013640874154318671978150702691578926912235318405120588096104222702992868492960182477857526176600665556671704106974346372234964363581, 65537)
enc3 = 17737974772490835017139672507261082238806983528533357501033270577311227414618940490226102450232473366793815933753927943027643033829459416623683596533955075569578787574561297243060958714055785089716571943663350360324047532058597960949979894090400134473940587235634842078030727691627400903239810993936770281755
n=public_key2[0]
h1=hints3[1]
h2=hints3[0]
var('p q')
bounds = {p: 2**512, q: 2**512}
eqs = [(q*h1 + p*h2 - h1*h2==0, n)]
sol = solve_linear_mod(eqs, bounds)
p = sol[p]
q = sol[q]
print("p=",p)
print("q=",q)
assert p*q==n
d = inverse(65537,(p-1)*(q-1))
print(long_to_bytes(pow(enc3,int(d),int(n))))
'''

'''
M = Matrix([
[h2,h4,0,0,1,0,0,0],
[-h1,0,h3,0,0,1,0,0],
[0,0,-h2,h4,0,0,1,0],
[0,-h1,0,-h3,0,0,0,1],
[n2,0,0,0,0,0,0,0],
[0,n2,0,0,0,0,0,0],
[0,0,n2,0,0,0,0,0],
[0,0,0,n2,0,0,0,0]
])
k = 2**(512+180)
W = diagonal_matrix([k, k, k,k,1, 1, 1, 1])
M = (M*W).LLL() / W
for row in M:

if row[:4] != 0:
continue
_, _, _,_, x1, x2, x3 ,x4 = row

for x in (x1, x2, x3,x4):

p2 = gcd(int(abs(x)),n2)

if p2 == 1:
continue
q2 = n2//p2
d2 = pow(e2, -1, (p2-1)*(q2-1))
print(long_to_bytes(int(pow(enc2, d2, n2))))
'''

3. 21_step

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import re
import random
from secrets import flag
print(f'Can you weight a 128 bits number in 21 steps')
pattern = r'([AB]|\d+)=([AB]|\d+)(\+|\-|\*|//|<<|>>|&|\^|%)([AB]|\d+)'

command = input().strip()
assert command[-1] == ';'
assert all([re.fullmatch(pattern, i) for i in command[:-1].split(';')])

step = 21
for i in command[:-1].split(';'):
t = i.translate(str.maketrans('', '', '=AB0123456789'))
if t in ['>>', '<<', '+', '-', '&', '^']:
step -= 1
elif t in ['*', '/', '%']:
step -= 3
if step < 0:exit()

success = 0
w = lambda x: sum([int(i) for i in list(bin(x)[2:])])
for _ in range(100):
A = random.randrange(0, 2**128)
wa = w(A)
B = 0
try : exec("global A; global B;" + command)
except : exit()
if A == wa:
success += 1

if success == 100:
print(flag)

做法:

要在21步之内测出一个数的权重,可以使用汉明权重算法
原理:
这里是 优化的SWAR 算法
先采用分治思想
优化前(朴素的 SWAR 算法)
即先两个两个一组,计算出每两个含1的个数
然后再四个四个、八个八个、以此类推
每一步运算可以进行优化
以下是优化之后的代码

1
2
3
4
5
6
7
8
A=A-((A>>1)&0x55555555555555555555555555555555)
A=(A&0x33333333333333333333333333333333)+((A>>2)&0x33333333333333333333333333333333)
A=((A+(A>>4))&0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f)
A=A+(A>>8)
A=A+(A>>16)
A=A+(A>>32)
A=A+(A>>64)
A=A&127

exp:

1
2
3
4
5
6
7
from pwn import *
command = '''B=A>>1;B=B&113427455640312821154458202477256070485;B=A-B;A=B&68056473384187692692674921486353642291;B=B>>2;B=B&68056473384187692692674921486353642291;B=B+A;A=B>>4;B=B+A;B=B&20016609818878733144904388672456953615;A=B>>8;B=B+A;A=B>>16;B=B+A;A=B>>32;B=B+A;A=B>>64;B=B+A;B=B&127;A=B+0;'''
io=remote("47.93.15.136",37092)
io.recvline()
#io.send(command)
io.interactive()
#flag{you_can_weight_it_in_21_steps!}

4.traditional_game

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
from Crypto.Util.number import getPrime,bytes_to_long
from secret import secret,flag
import random
import time
import os
import signal

def _handle_timeout(signum, frame):
raise TimeoutError('function timeout')

timeout = 300
signal.signal(signal.SIGALRM, _handle_timeout)
signal.alarm(timeout)

random.seed(secret + str(int(time.time())).encode())

class RSA:
def __init__(self):
self.p = getPrime(512)
self.q = getPrime(512)
self.e = getPrime(128)
self.n = self.p * self.q
self.phi = (self.p - 1) * (self.q - 1)
self.d = pow(self.e, -1, self.phi)

def get_public_key(self):
return (self.n, self.e)

def get_private_key(self, blind_bit=None, unknown_bit=None):
if blind_bit is not None and unknown_bit is not None:
blind = getPrime(blind_bit)
d_ = ((int(self.d >> unknown_bit) // blind * blind) << unknown_bit) + int(self.d % blind)
return (d_, blind)
else:
return (self.d, 0)

def encrypt(self, m):
if type(m) == bytes:
m = bytes_to_long(m)
elif type(m) == str:
m = bytes_to_long(m.encode())
return pow(m, self.e, self.n)

def game(self,m0,m1,b):
return self.encrypt([m0,m1][b])


rsa = RSA()
token = os.urandom(66)

print( "[+] Welcome to the game!")
print(f"[+] rsa public key: {rsa.get_public_key()}")

coins = 100
price = 100
while coins > 0:
print("=================================")
b = random.randint(0,1)
c = rsa.game(
b'bit 0:' + os.urandom(114),
b'bit 1:' + os.urandom(114),
b)
print("[+] c:",c)
guessb = int(input("[-] b:"))
coins -= 1
if guessb == b:
price -= 1
print("[+] correct!")
else:
print("[+] wrong!")

if price != 0:
print("[-] game over!")
exit()

blind_bit = 40
unknown_bit = 365

d_,blind = rsa.get_private_key(blind_bit, unknown_bit)

print( "[+] Now, you have permission to access the privkey!")
print(f"[+] privkey is: ({d_},{blind}).")
print(f"[+] encrypt token is: {rsa.encrypt(bytes_to_long(token))}")

guess_token = bytes.fromhex(input("[-] guess token:"))
if guess_token == token:
print("[+] correct token, here is your flag:",flag)
else:
print("[-] wrong token")

做法:

第一关:
侧信道,seed与时间有关,于是可以同时连两个靶机,一个看答案,一个填答案。
第二关:
私钥部分泄露
首先复现鸡块师傅的wp

1
2
dh = (d_ >> unknown_bit) // blind
dl = d_ % blind

将 blind 记为 B,可以得到如下式子:

其中$d_m$未知
有了 d的近似高位和e
由$ed=k \phi(n)+1$得

于是可以求出 d 的近似值
继续代入等式$ed=k \phi(n)+1$
将已知数据代入,可得

整理得

设$M=e(2^{365}Bd_h+d_l)-k(n+1)-1$
于是有

$M$ 比 $d_m$ 和 $(p+q)$都要大,所以可以使用 LLL 进行规约求解
但是 LLL 并没有得到预期结果,而是找到了一个更短的向量
这个向量为

而第二行为

因为第二行数量级与$p+q$的数量级相近,于是可以得到$p+q$的高位
$(p+q)%eB$即为$p+q$的低位
于是可以转化为copper问题
将已知p+q高低位问题转化为已知p高低位问题
(低位是模eB意义下的)
首先在精度环上找到p的高位

1
2
3
4
#sage
PR.<x> = PolynomialRing(RealField(1000))
f = x*(pqh-x) - n
ph = int(f.roots()[0][0]) // (e*blind) * (e*blind)

其次分别在模 e 和 B 意义下去寻找 p的低位,然后做 CRT,求得 p 模 eB 意义下的低位
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#sage
R.<x> = PolynomialRing(Zmod(e))
fe = x*(pql-x) - n
rese = fe.roots()

R.<x> = PolynomialRing(Zmod(blind))
fb = x*(pql-x) - n
resb = fb.roots()

for i in rese:
for j in tqdm(resb):
nlist = [e,blind]
clist = [int(i[0]),int(j[0])]
pl = int(crt(clist,nlist))

然后就成功转化为已知p高低位的coppersmith

然后对该式在模 n 意义下求小根即可(不过调参我是真调不明白,回头系统学一下)
自己重写的exp:
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from sage.all import *
from Crypto.Util.number import *
#set_verbose(2)
n, e = 85326799303014496026064371730108772674311332235197622668632563161991602151711567135121280447576711444698674128128361298108919951648223986067215747231280671858955299505770967232491254103263536714363392698361887554304255293991522369123049450389169430042203506125207632731477059899911948136482137033584148217327, 254105853966712863308295955275449077351
d_, blind = 21378651607895524021279554589638483737491146093477974150650211288463988209605132503571807152155799637952833578907915487652394101057156932695702372344185513500134378667094923442647974423915643213700386663283702204046537471425141802799603607927835879677131664511051343930330150649244588933823965535065854996174,1033378191583
c = 53742732129028328063112055299975805421399396945032126712022723372351554830940247890238890674346304685771599765645061449905866414886468887177488826724343823941484173305683401484367061591100780027467534437239106132736115748345075082986831034406103970493456683245813494600511020286115561513979129441895596164513
blind_bit = 40
unknown_bit = 365
k = (e*d_ - 1) // n + 1
dh = (d_ >> (365)) // blind
dl = d_ % blind


M=e*(2**365*blind*dh+dl)-k*(n+1)-1
K=2**(513-unknown_bit)
L=matrix(ZZ,[[K,0,e*blind],[0,1,k],[0,0,M]])
L[:,-1:] *= M
L = L.LLL()
L[:,:1] /= K
#print(L)
#print(int(L[1][1]).bit_length())
pqh = L[1][1] // (e*blind) * (e*blind)
pql = L[1][1] % (e*blind)
#print(pqh)
#pqh=18507769095935379124387654959898265148693230444521588629361097006302149784602492419374694127887114275959323662548976532766729044254524730977398946311925444
PR=PolynomialRing(RealField(1000),'x')
x=PR.gen()
f = x*(pqh-x) - n
ph = int(f.roots()[0][0])//(e*blind)*(e*blind)
#print(ph)
R=PolynomialRing(Zmod(e),'x')
x=R.gen()
f=x*(pql-x)-n
re=f.roots()
R=PolynomialRing(Zmod(blind),'x')
x=R.gen()
f=x*(pql-x)-n
rb=f.roots()
n, e = 85326799303014496026064371730108772674311332235197622668632563161991602151711567135121280447576711444698674128128361298108919951648223986067215747231280671858955299505770967232491254103263536714363392698361887554304255293991522369123049450389169430042203506125207632731477059899911948136482137033584148217327, 254105853966712863308295955275449077351
d_, blind = 21378651607895524021279554589638483737491146093477974150650211288463988209605132503571807152155799637952833578907915487652394101057156932695702372344185513500134378667094923442647974423915643213700386663283702204046537471425141802799603607927835879677131664511051343930330150649244588933823965535065854996174,1033378191583
c = 53742732129028328063112055299975805421399396945032126712022723372351554830940247890238890674346304685771599765645061449905866414886468887177488826724343823941484173305683401484367061591100780027467534437239106132736115748345075082986831034406103970493456683245813494600511020286115561513979129441895596164513
ph= 8699285662194670581068573248270824005815358225863866569197658526663593487792213714033312321399166457288086214766777389663713682155573983780505533662370967
rese= [(62152471902631138505624687104331817667, 1), (8435944108528164915116898250995780984, 1)]
resb= [(727798351633, 1), (588657551195, 1)]
for i in re:
for j in rb:
nlist=[e,blind]
clist=[int(i[0]),int(j[0])]
pl=int(crt(clist,nlist))
PR=PolynomialRing(Zmod(n),'x')
x=PR.gen()
f=ph+e*blind*x+pl
root=f.monic().small_roots(X=2**(512-105-167+3),beta=0.499,epsilon=0.02)
print(root)
if root!=[]:
p=int(ph+e*blind*root[0]+pl)
q=n//p
d=inverse(e,(p-1)*(q-1))
print(long_to_bytes(pow(c,d,n)).hex())

5. ECRandom_game

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
from flag import M, q, a, b, select
import hashlib
from hashlib import sha256
from Crypto.Util.number import *
from Crypto.Cipher import AES
import sys
import ecdsa
from Crypto.Util.Padding import pad, unpad
from ecdsa.ellipticcurve import CurveFp,Point
from math import ceil
import os
import random
import string

flag = b'qwb{kLeMjJw_HBPtoHsVhnnxZdvtGjomivNDUI_vMRhZHrfKlCZ6HlGAeXRV_gQ8i117nGhzEMr0Zk_YTl1wftSskpX4JLnryE9Mhl96cPTWorGCl_R6nD33bcx1AYflag_leak}'
assert len(flag) == 136

BANNER = '''
GGGGG OOOOO DDDDD DDDDD GGGGG AAA MM MM EEEEEEE
GG OO OO DD D DD D GG AAAAA MMM MMM EE
GG GGG OO OO DD D DD D GG GGG A A MM MM MM EEEEE
GG GG OO OO DD D DD D GG GG AAAAA MM MM EE
GGGGGGG OOOOO DDDDD DDDDD GGGGGGG A A MM MM EEEEEEE
'''

NNN = []
def die(*args):
pr(*args)
quit()

def pr(*args):
s = " ".join(map(str, args))
sys.stdout.write(s + "\n")
sys.stdout.flush()

def sc():
return sys.stdin.buffer.readline()

def Rng(k):
ran = random.getrandbits(k)
NNN.append(ran)
return ran


def ADD(num):
NUM = 0
for i in range(num):
NUM += Rng(32)
return NUM

def secure_choice(sequence):
if not sequence:
return None
randbelow = 0
for i, x in enumerate(sequence):
randbelow += 1
if os.urandom(1)[0] < (1 << 8) * randbelow // len(sequence):
return x

def xDBLADD(P, Q, PQ, q, a, b):
(X1, Z1), (X2, Z2), (X3, Z3) = PQ, P, Q
X4 = (X2**2 - a * Z2**2) ** 2 - 8 * b * X2 * Z2**3
Z4 = 4 * (X2 * Z2 * (X2**2 + a * Z2**2) + b * Z2**4)
X5 = Z1 * ((X2 * X3 - a * Z2 * Z3) ** 2 - 4 * b * Z2 * Z3 * (X2 * Z3 + X3 * Z2))
Z5 = X1 * (X2 * Z3 - X3 * Z2) ** 2
X4, Z4, X5, Z5 = (c % q for c in (X4, Z4, X5, Z5))
return (X4, Z4), (X5, Z5)

def xMUL(P, k, q, a, b):
Q, R = (1, 0), P
for i in reversed(range(k.bit_length() + 1)):
if k >> i & 1:
R, Q = Q, R
Q, R = xDBLADD(Q, R, P, q, a, b)
if k >> i & 1:
R, Q = Q, R
return Q

def shout(x, d, q, a, b):
P = (x,1)
Q = xMUL(P, d, q, a, b)
return Q[0] * pow(Q[1], -1, q) % q

def generate_random_string(length):
characters = string.ascii_letters + string.digits
random_string = ''.join(secure_choice(characters) for i in range(length))
return random_string

class ECCDu():
def __init__(self,curve,G):
self.state = getRandomNBitInteger(512)
self.Curve = curve
self.g = G

self.num = Rng(32)
d = 65537
self.Q = self.num*self.g
self.P = d * self.Q

def ingetkey(self):
t = int((self.state * self.Q).x())
self.updade()
return t%(2**250)

def updade(self):
self.state = int((self.state * self.P).x())

def Random_key(self, n:int):
out = 0
number = ceil(n/250)
for i in range(number):
out = (out<<250) + self.ingetkey()
return out % (2**n)

def proof_of_work():
random.seed(os.urandom(8))
proof = ''.join([random.choice(string.ascii_letters + string.digits) for _ in range(20)])
_hexdigest = sha256(proof.encode()).hexdigest()
pr(f"sha256(XXXX+{proof[4:]}) == {_hexdigest}".encode())
pr('Give me XXXX: ')
x = sc().rstrip(b'\n')
if len(x) != 4 or sha256(x + proof[4:].encode()).hexdigest() != _hexdigest:
return False
return True

def main():
pr(BANNER)
pr('WELCOME TO THIS SIMPLE GAME!!!')
ASSERT = proof_of_work()
if not ASSERT:
die("Not right proof of work")

pr('Now we will start our formal GAME!!!')
pr('===== First 1💪: =====')
pr('Enter an integer as the parameter p for Curve: y^2 = x^3+12x+17 (mod p) and 250<p.bit_length()')
p1 = int(sc())
if not 250<=p1.bit_length():
die('Wrong length!')
curve = CurveFp(p1, 12, 17,1)
pr(curve)
pr('Please Enter a random_point G:')
G_t = sc().split(b' ')
Gx,Gy = int(G_t[0]),int(G_t[1])
if not curve.contains_point(Gx,Gy):
die('This point is outside the curve')
G = Point(curve,Gx,Gy)

for i in range(500):
ECDU = ECCDu(curve,G)
m = 'My secret is a random saying of phrase,As below :' + generate_random_string(119)
Number = ECDU.Random_key(1344)
c = Number^bytes_to_long(m.encode())
pr(f'c = {c}')
pr(f'P = {int(ECDU.P.x()), int(ECDU.P.y())}')
pr(f'Q = {int(ECDU.Q.x()), int(ECDU.Q.y())}')

pr('Enter m:')
m_en = sc().rstrip(b'\n')
if m_en != m.encode():
die('This is not the right m,Please try again')
else:
pr('Right m!!!')
pr('Bingo!')
new_state,new_state1 = ADD(136),ADD(50)

random.seed(new_state)

pr('===== Second 2💪: =====')
curve1 = CurveFp(q,a,b,1)
pr(f'{int(curve1.p()),int(curve1.a()),int(curve1.b())}')

pr("Enter a number that does not exceed 1500")
number = int(sc())

pr(f'You only have {number} chances to try')
success = 0
for i in range(number):
Gx = secure_choice(select)
R = Rng(25)
pr('Gx = ',Gx)
pr('Px = ',shout(Gx, R, q, a, b))
R_n = int(sc().rstrip(b'\n'))
if R_n != R:
pr(f'Wrong number!!!,Here is your right number {R}')
else:
pr('GGood!')
success += 1

if int(success)/int(number) <= 0.262:
die('Please Try more...')

random.seed(new_state)
iv_num = ADD(2000)

iv = hashlib.sha256(str(iv_num).encode()).digest()[:16]
key = hashlib.sha256(str(new_state1).encode()).digest()[:16]
Aes = AES.new(key,AES.MODE_CBC, iv)
C = Aes.encrypt(pad(flag,16))

key_n, iv_n = int(sc()), int(sc())
iv1 = hashlib.sha256(str(iv_n).encode()).digest()[:16]
key1 = hashlib.sha256(str(key_n).encode()).digest()[:16]
Aes_verify = AES.new(key1,AES.MODE_CBC, iv1)
C_verify = unpad(Aes_verify.decrypt(C),16)

if C_verify == flag:
pr('Congratulations🎇🎇🎇!!!!')
pr('Here is your flag😊:', M)
else:
pr('Maybe you could get the right flag!')

if __name__ == '__main__':
main()

做法:

step1:
还是老经典了,proof_of_work,爆一下工作量证明即可

step2:
总共 500 次,每次生成了一个 key,但根据其分块方式高$1500-1344$位是无效位,可以不用管

其余依次分为$94 | 250 | 250 | 250 | 250 | 250$

因为已知的前缀明文有49个字符。也就是392位泄露
因此第二块是完全知道的,第三块知道$392-94-250=48$也就是高48位
然后由于素数 p 可以由我们控制,就可以让它略大于250位,使得$t%2^{250}=t$
由第二块的 t1 可以通过计算得到第三块的 state ,从而递推得到所有的 state
得到所有的 state 后就可以得到 key 从而过关

step3:
500 轮之后,$ADD(136)$和$ADD(50)$分别生成了136个和50个$Rng(32)$之和
因为MT19937具有周期性,拥有 624 个连续生成的随机数就可以预测所有随机数,因此 new_state1 是完全可以预测的
审计后面的代码,可知现在得到的 new_state1 即是后面 AES 的 key

step4:
已知椭圆曲线方程还有 P 和 G ,一眼看去是个 25bit 的数的 ECDLP
实际上不用进行 ECDLP ,因为没有限制最大是1500,所以我们可以通过报错拿到数据,然后再全部预测成功后面的数据即可
预测完之后求到 seed 然后再发送即可
复现exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
from sage.all import *
import hashlib
from hashlib import sha256
from Crypto.Util.number import *
from Crypto.Cipher import AES
import sys
import ecdsa
from Crypto.Util.Padding import pad, unpad
from ecdsa.ellipticcurve import CurveFp,Point
from math import ceil
import os
import random
import string
from gmpy2 import invert

M=b"flag{You_have_defeated_MT19937_and_ECC!!!}"
a=getRandomInteger(256)
b=getRandomInteger(256)
q=getPrime(256)
flag = b'qwb{kLeMjJw_HBPtoHsVhnnxZdvtGjomivNDUI_vMRhZHrfKlCZ6HlGAeXRV_gQ8i117nGhzEMr0Zk_YTl1wftSskpX4JLnryE9Mhl96cPTWorGCl_R6nD33bcx1AYflag_leak}'
assert len(flag) == 136
select=os.urandom(16)
BANNER = '''
GGGGG OOOOO DDDDD DDDDD GGGGG AAA MM MM EEEEEEE
GG OO OO DD D DD D GG AAAAA MMM MMM EE
GG GGG OO OO DD D DD D GG GGG A A MM MM MM EEEEE
GG GG OO OO DD D DD D GG GG AAAAA MM MM EE
GGGGGGG OOOOO DDDDD DDDDD GGGGGGG A A MM MM EEEEEEE
'''

NNN = []
def die(*args):
pr(*args)
quit()

def pr(*args):
s = " ".join(map(str, args))
sys.stdout.write(s + "\n")
sys.stdout.flush()

def sc():
return sys.stdin.buffer.readline()

def Rng(k):
ran = random.getrandbits(k)
NNN.append(ran)
return ran


def ADD(num):
NUM = 0
for i in range(num):
NUM += Rng(32)
return NUM

def secure_choice(sequence):
if not sequence:
return None
randbelow = 0
for i, x in enumerate(sequence):
randbelow += 1
if os.urandom(1)[0] < (1 << 8) * randbelow // len(sequence):
return x

def xDBLADD(P, Q, PQ, q, a, b):
(X1, Z1), (X2, Z2), (X3, Z3) = PQ, P, Q
X4 = (X2**2 - a * Z2**2) ** 2 - 8 * b * X2 * Z2**3
Z4 = 4 * (X2 * Z2 * (X2**2 + a * Z2**2) + b * Z2**4)
X5 = Z1 * ((X2 * X3 - a * Z2 * Z3) ** 2 - 4 * b * Z2 * Z3 * (X2 * Z3 + X3 * Z2))
Z5 = X1 * (X2 * Z3 - X3 * Z2) ** 2
X4, Z4, X5, Z5 = (c % q for c in (X4, Z4, X5, Z5))
return (X4, Z4), (X5, Z5)

def xMUL(P, k, q, a, b):
Q, R = (1, 0), P
for i in reversed(range(k.bit_length() + 1)):
if k >> i & 1:
R, Q = Q, R
Q, R = xDBLADD(Q, R, P, q, a, b)
if k >> i & 1:
R, Q = Q, R
return Q

def shout(x, d, q, a, b):
P = (x,1)
Q = xMUL(P, d, q, a, b)
return Q[0] * pow(Q[1], -1, q) % q

def generate_random_string(length):
characters = string.ascii_letters + string.digits
random_string = ''.join(secure_choice(characters) for i in range(length))
return random_string

class ECCDu():
def __init__(self,curve,G):
self.state = getRandomNBitInteger(512)
self.Curve = curve
self.g = G

self.num = Rng(32)
d = 65537
self.Q = self.num*self.g
self.P = d * self.Q

def ingetkey(self):
t = int((self.state * self.Q).x())
self.updade()
return t%(2**250)

def updade(self):
self.state = int((self.state * self.P).x())

def Random_key(self, n:int):
out = 0
number = ceil(n/250)
for i in range(number):
out = (out<<250) + self.ingetkey()
return out % (2**n)

def proof_of_work():
import tqdm,itertools
random.seed(os.urandom(8))
proof = ''.join([random.choice(string.ascii_letters + string.digits) for _ in range(20)])
_hexdigest = sha256(proof.encode()).hexdigest()
pr(f"sha256(XXXX+{proof[4:]}) == {_hexdigest}".encode())
pr('Give me XXXX: ')
for prefix in tqdm.tqdm(itertools.product(string.ascii_letters + string.digits, repeat=4)):
prefix = ''.join(prefix).encode()
if hashlib.sha256(prefix+proof[4:].encode()).hexdigest() == _hexdigest:
x=prefix
break
if len(x) != 4 or sha256(x + proof[4:].encode()).hexdigest() != _hexdigest:
return False
return True
def get_new_state1(randnums):
def inverse_right_mask(res, shift, mask=0xffffffff, bits=32):
tmp = res
for i in range(bits // shift):
tmp = res ^ tmp >> shift & mask
return tmp
def inverse_left_mask(res, shift, mask=0xffffffff, bits=32):
tmp = res
for i in range(bits // shift):
tmp = res ^ tmp << shift & mask
return tmp
def extract_number(y):
y = y ^ y >> 11
y = y ^ y << 7 & 2636928640
y = y ^ y << 15 & 4022730752
y = y ^ y >> 18
return y&0xffffffff
def recover(y):
y = inverse_right_mask(y,18)
y = inverse_left_mask(y,15,4022730752)
y = inverse_left_mask(y,7,2636928640)
y = inverse_right_mask(y,11)
return y&0xffffffff
states = list(map(recover, randnums))
states2 = []
for index in range(50):
i = 32 + index - 20
y = (states[i] & 0x80000000) + (states[(i + 1) % 624] & 0x7fffffff)
z = (y >> 1) ^ states[(i + 397) % 624]
if y % 2 != 0:
z = z ^ 0x9908b0df
states2.append(z)

randnums2 = list(map(extract_number, states2))
new_state1 = sum(randnums2)
print(f'{new_state1 = }')
def main():
pr(BANNER)
pr('WELCOME TO THIS SIMPLE GAME!!!')
ASSERT =1
#proof_of_work()
if not ASSERT:
die("Not right proof of work")

pr('Now we will start our formal GAME!!!')
pr('===== First 1💪: =====')
pr('Enter an integer as the parameter p for Curve: y^2 = x^3+12x+17 (mod p) and 250<p.bit_length()')
p1 = int(next_prime(2**249))
if not 250<=p1.bit_length():
die('Wrong length!')
E = EllipticCurve(Zmod(p1), [12, 17])
n = E.order()
n1 = n // prod([2, 19, 197, 769, 4787, 9341])
while True:
G = E.random_point()
if G.order() == n:
break
G = n1 * G
curve = CurveFp(p1, 12, 17,1)
pr(curve)
pr('Please Enter a random_point G:')
G_t = G
Gx,Gy = int(G_t[0]),int(G_t[1])
if not curve.contains_point(Gx,Gy):
die('This point is outside the curve')
G = Point(curve,Gx,Gy)
randnums=[]
'''
for i in range(500):
ECDU = ECCDu(curve,G)
m = 'My secret is a random saying of phrase,As below :' + generate_random_string(119)
Number = ECDU.Random_key(1344)
c = Number^bytes_to_long(m.encode())
pr(f'c = {c}')
pr(f'P = {int(ECDU.P.x()), int(ECDU.P.y())}')
pr(f'Q = {int(ECDU.Q.x()), int(ECDU.Q.y())}')
d = 65537
known = b'My secret is a random saying of phrase,As below :' + b'\x00'*119
m1 = bytes_to_long(known) ^ c
prefix = bytes_to_long(long_to_bytes(m1, len(known))[:len(known)-119])<<(119*8)
number = ceil(1344/250)
outs = [(prefix>>(i*250)) % 2**250 for i in range(number)][::-1]
t1=outs[1]
hs2=outs[2]
sQ=E.lift_x(ZZ(t1))
sP=d*sQ
state=ZZ(sP.xy()[0])
outs = outs[:2]
P=str(ECDU.P)
P=E(eval(P))
#print(type(P))
Q=str(ECDU.Q)
Q=E(eval(Q))
for i in range(number-2):
t = int((state*Q).xy()[0])
state = int((state*P).xy()[0])
outs.append(t % 2**250)
out = 0
for t in outs:
out = (out<<250) + (t)
m1 = long_to_bytes(out ^ c)
pr('Enter m:')
m_en = m1
if m_en != m.encode():
die('This is not the right m,Please try again')
else:
pr('Right m!!!')
G=str(ECDU.g)
G=E(eval(G))
r = G.discrete_log(Q)
randnums.append(r)
'''
for i in range(500):
randnums.append(Rng(32))
pr('Bingo!')
print(len(randnums))
new_state,new_state1 = ADD(136),ADD(50)

random.seed(new_state)
_new_state1=get_new_state1(randnums)
pr('===== Second 2💪: =====')
curve1 = CurveFp(q,a,b,1)
pr(f'{int(curve1.p()),int(curve1.a()),int(curve1.b())}')

pr("Enter a number that does not exceed 1500")
number = 1700

pr(f'You only have {number} chances to try')
success = 0
leak=[]
for i in range(1248):
Gx = secure_choice(select)
R = Rng(25)
pr('Gx = ',Gx)
pr('Px = ',shout(Gx, R, q, a, b))
R_n = 1
if R_n != R:
pr(f'Wrong number!!!,Here is your right number {R}')
leak.append(R)
else:
pr('GGood!')
success += 1
import sys
sys.path.append('./MT19937-Symbolic-Execution-and-Solvermaster/source')
from MT19937 import MT19937, MT19937_symbolic
rng_clone = MT19937(state_from_data = (leak, 24))
outputs = [rng_clone() for _ in range(624)]
for _ in range(1248 - 624):
rng_clone()
for i in range(1700-1248):
Gx = secure_choice(select)
R = Rng(25)
pr('Gx = ',Gx)
pr('Px = ',shout(Gx, R, q, a, b))
R_n = rng_clone() >> (32-25)
if R_n != R:
pr(f'Wrong number!!!,Here is your right number {R}')
else:
pr('GGood!')
success += 1
if int(success)/int(number) <= 0.262:
die('Please Try more...')
from z3mt import state2seed624
seed = state2seed624(outputs)
_new_state = seed
random.seed(_new_state)
iv_n = 0
for _ in range(2000):
iv_n += random.getrandbits(32)

random.seed(new_state)
iv_num = ADD(2000)

iv = hashlib.sha256(str(iv_num).encode()).digest()[:16]
key = hashlib.sha256(str(new_state1).encode()).digest()[:16]
Aes = AES.new(key,AES.MODE_CBC, iv)
C = Aes.encrypt(pad(flag,16))

key_n, iv_n = _new_state1
iv1 = hashlib.sha256(str(iv_n).encode()).digest()[:16]
key1 = hashlib.sha256(str(key_n).encode()).digest()[:16]
Aes_verify = AES.new(key1,AES.MODE_CBC, iv1)
C_verify = unpad(Aes_verify.decrypt(C),16)

if C_verify == flag:
pr('Congratulations🎇🎇🎇!!!!')
pr('Here is your flag😊:', M)
else:
pr('Maybe you could get the right flag!')

if __name__ == '__main__':
main()

6.electronic_game

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from sage.all import *
from sage.rings.finite_rings.hom_finite_field import FiniteFieldHomomorphism_generic
from Crypto.Util.number import *
from base64 import b64encode
from random import *
from secret import flag
import signal

def _handle_timeout(signum, frame):
raise TimeoutError('function timeout')

timeout = 66
signal.signal(signal.SIGALRM, _handle_timeout)
signal.alarm(timeout)

def qary_trans_to_int(x, q):
return sum([int(x[i]) * q**i for i in range(len(x))])

def encode(f, q):
try:
return b64encode(long_to_bytes(qary_trans_to_int(f.polynomial().coefficients(sparse = False), q)))
except:
return b64encode(long_to_bytes(qary_trans_to_int(f.coefficients(sparse = False), q)))

def generate_irreducible_polynomial(R, n):
while True:
f = R.random_element(degree=n)
while f.degree() != n:
f = R.random_element(degree=n)
if f.is_irreducible():
return f

def generate_sparse_irreducible_polynomial(R, n):
x = R.gen()
while True:
g = sum(choice([-1, 0, 1]) * x**i for i in range(randint(1, n//2 + 1)))
if (x**n + g + 1).is_irreducible():
return x**n + g + 1

def random_polynomial(R, n, beta):
return sum(randrange(-beta, beta) * R.gen()**i for i in range(randint(0, n))) + R.gen()**n

q = 333337
n = 128
beta = 333
chance = 111
polyns = beta//chance
bound = 106
R = PolynomialRing(GF(q),'x')

F = generate_irreducible_polynomial(R,n).monic()

k1 = GF(q**n, name = 'a', modulus = generate_sparse_irreducible_polynomial(R,n).monic())
k2 = GF(q**n, name = 'b', modulus = F)

phi = FiniteFieldHomomorphism_generic(Hom(k1, k2))

print("F:", encode(F,q).decode())

win_count = 0
for _ in range(chance):
opt = randint(0, 1)
if opt:
As = [phi(random_polynomial(k1,n,beta)) for i in range(polyns)]
else:
As = [k2.random_element() for i in range(polyns)]

for i in range(polyns):
print(f"As[{i}]: {encode(As[i],q).decode()}")

opt_guess = input("Guess the option[0/1]: ")
if int(opt_guess) != opt:
print("Wrong guess!")
else:
win_count += 1
print("Correct guess!")

if win_count >= bound:
print("You are so smart! Here is your flag:")
print(flag)
else:
print("No flag for you!")

做法:

该题目生成了两个多项式 $F,G$,并在两个多项式以及基域$GF(q)$的基础上生成了两个扩域
其中

然后建立了$k_1$到$k_2$的一个同态映射$phi()$
设$A_1$是随机生成的系数较小的多项式(绝对值小于333),$A_2$是扩域$k_2$上的随机多项式

我们需要去根据结果猜opt
看了学长的wp,发现他们使用域中元素的迹来判断opt
域中元素的迹的定义是
$F=\mathbb{F}_{q^m}$是$K=\mathbb{F}_q$的有限扩张
那么,我们有

$K$上的迹$\bf{Tr}_{F/K}(\alpha)=\alpha + \alpha^{q} + \cdots +\alpha^{q^{m-1}}$
而且有定理可知:

由于$A_1$的迹很小,且经过同态映射后,迹不发生改变(抽代没学好,不知道为啥)
因此可以通过比较迹来判断 opt 的值
但是我最后复现感觉概率也不是很高,在思考有没有提高概率的方法
复现exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
from sage.all import *
from sage.rings.finite_rings.hom_finite_field import FiniteFieldHomomorphism_generic
from Crypto.Util.number import *
from base64 import *
from random import *
import signal
flag=b"flag{Great!!!You_have_solved_the_electronic_game!!Keep_going!!}"
def _handle_timeout(signum, frame):
raise TimeoutError('function timeout')

timeout = 66
signal.signal(signal.SIGALRM, _handle_timeout)
signal.alarm(timeout)

def qary_trans_to_int(x, q):
return sum([int(x[i]) * q**i for i in range(len(x))])

def encode(f, q):
try:
return b64encode(long_to_bytes(qary_trans_to_int(f.polynomial().coefficients(sparse = False), q)))
except:
return b64encode(long_to_bytes(qary_trans_to_int(f.coefficients(sparse = False), q)))

def generate_irreducible_polynomial(R, n):
while True:
f = R.random_element(degree=n)
while f.degree() != n:
f = R.random_element(degree=n)
if f.is_irreducible():
return f

def generate_sparse_irreducible_polynomial(R, n):
x = R.gen()
while True:
g = sum(choice([-1, 0, 1]) * x**i for i in range(randint(1, n//2 + 1)))
if (x**n + g + 1).is_irreducible():
return x**n + g + 1

def random_polynomial(R, n, beta):
return sum(randrange(-beta, beta) * R.gen()**i for i in range(randint(0, n))) + R.gen()**n
def decode(encoded_str, q, R):
decoded_bytes = b64decode(encoded_str)
integer = bytes_to_long(decoded_bytes)
coefficients = []
while integer > 0:
coefficients.append(integer % q)
integer //= q
return R(coefficients)
q=333337
n = 128
beta = 333
chance = 111
polyns = beta//chance
bound = 106
R = PolynomialRing(GF(q),'x')

F = generate_irreducible_polynomial(R,n).monic()

k1 = GF(q**n, name = 'a', modulus = generate_sparse_irreducible_polynomial(R,n).monic())
k2 = GF(q**n, name = 'b', modulus = F)

phi = FiniteFieldHomomorphism_generic(Hom(k1, k2))

print("F:", encode(F,q).decode())

win_count = 0
for _ in range(chance):
opt = randint(0, 1)
if opt:
As = [phi(random_polynomial(k1,n,beta)) for i in range(polyns)]
else:
As = [k2.random_element() for i in range(polyns)]
'''
for i in range(polyns):
print(f"As[{i}]: {encode(As[i],q).decode()}")
'''
GFy = GF(q**n, "y", modulus=F)
A=[]
for i in range(polyns):
i=decode(encode(As[i],q),q,R)
A.append(GFy(i))
samples = A
queries = []
queries1=[]
for sample in samples:
trace = int(sample.trace() % q)
#print(trace)
if int(trace) - q // 2 < 0:
# print(trace)
queries.append(trace<=q//4)
queries1.append(trace)
else:
# print(q - trace)
queries.append(q - trace<=q//4)
queries1.append(q-trace)
'''
if any(_>125000 for _ in queries1):
result = False
cnt = sum(_>100000 for _ in queries1)
if cnt == 1 and sum(queries1) < 170000:
result = True
'''
result = sum(queries) > 2
opt_guess =1 if result else 0
if int(opt_guess) != opt:
print("Wrong guess!")
else:
win_count += 1
print("Correct guess!")

if win_count >= bound:
print("You are so smart! Here is your flag:")
print(flag)
else:
print("No flag for you!")
print(win_count)

7.homomor_game

题目:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import tenseal.sealapi as sealapi
from random import randint
from signal import alarm
import base64

g = 5
poly_modulus_degree = 8192
plain_modulus = 163841

def gen_keys():
parms = sealapi.EncryptionParameters(sealapi.SCHEME_TYPE.BFV)
parms.set_poly_modulus_degree(poly_modulus_degree)
parms.set_plain_modulus(plain_modulus)
coeff = sealapi.CoeffModulus.BFVDefault(poly_modulus_degree, sealapi.SEC_LEVEL_TYPE.TC128)
parms.set_coeff_modulus(coeff)

ctx = sealapi.SEALContext(parms, True, sealapi.SEC_LEVEL_TYPE.TC128)

keygen = sealapi.KeyGenerator(ctx)
public_key = sealapi.PublicKey()
keygen.create_public_key(public_key)
secret_key = keygen.secret_key()

parms.save("app/parms")
public_key.save("app/public_key")
secret_key.save("app/secret_key")

def load():
parms = sealapi.EncryptionParameters(sealapi.SCHEME_TYPE.BFV)
parms.load("app/parms")

ctx = sealapi.SEALContext(parms, True, sealapi.SEC_LEVEL_TYPE.TC128)

public_key = sealapi.PublicKey()
public_key.load(ctx, "app/public_key")

secret_key = sealapi.SecretKey()
secret_key.load(ctx, "app/secret_key")
return ctx, public_key, secret_key

def gen_galois_keys(ctx, secret_key, elt):
keygen = sealapi.KeyGenerator(ctx, secret_key)
galois_keys = sealapi.GaloisKeys()
keygen.create_galois_keys(elt, galois_keys)
galois_keys.save("app/galois_key")
return galois_keys

def gen_polynomial(a):
return '1x^' + str(a)

def f(a, b):
return (pow(g, a-b, plain_modulus) + pow(g, b-a, plain_modulus) + pow(g, 3*a-b, plain_modulus) + pow(g, a-3*b, plain_modulus))%plain_modulus

def check_result(ctx, decryptor, a, b, pos):
plaintext = sealapi.Plaintext()
ciphertext = sealapi.Ciphertext(ctx)
ciphertext.load(ctx, "app/computation")
decryptor.decrypt(ciphertext, plaintext)
assert plaintext[pos] == f(a, b)

def send(filepath):
f = open(filepath, "rb")
data = base64.b64encode(f.read()).decode()
f.close()
print(data)

def recv(filepath):
try:
data = base64.b64decode(input())
except:
print("Invalid Base64!")
exit(0)

f = open(filepath, "wb")
f.write(data)
f.close()

def main():
ctx, public_key, secret_key = load()
encryptor = sealapi.Encryptor(ctx, public_key)
decryptor = sealapi.Decryptor(ctx, secret_key)

a, b = [randint(1, poly_modulus_degree - 1) for _ in range(2)]
poly_a, poly_b = gen_polynomial(a), gen_polynomial(b)

plaintext_a, plaintext_b = sealapi.Plaintext(poly_a), sealapi.Plaintext(poly_b)
ciphertext_a, ciphertext_b = [sealapi.Ciphertext() for _ in range(2)]
encryptor.encrypt(plaintext_a, ciphertext_a)
encryptor.encrypt(plaintext_b, ciphertext_b)
ciphertext_a.save("app/ciphertext_a")
ciphertext_b.save("app/ciphertext_b")
galois_used = 0

alarm(300)

while True:
try:
choice = int(input("Give Me Your Choice:"))
except:
print("Invalid choice!")
exit(0)

if choice == 0:
print("Here Is Ciphertext_a:")
send("app/ciphertext_a")
print("Here Is Ciphertext_b:")
send("app/ciphertext_b")

elif choice == 1:
if galois_used == 1:
print("No More!")
exit(0)
try:
elt = int(input("Please give me your choice:"))
except:
print("Invalid input!")
exit(0)

try:
galois_key = gen_galois_keys(ctx, secret_key, [elt])
except:
print("Invalid galois!")
exit(0)

print("Here is your galois key:")
send("app/galois_key")
galois_used = 1

elif choice == 2:
try:
pos = int(input("Give Me Your Position:"))
assert pos in range(poly_modulus_degree)
except:
print("Invalid position!")
exit(0)

print("Give Me Your Computation")
recv("app/computation")

try:
check_result(ctx, decryptor, a, b, pos)
except:
print("Incorret Answer!")
exit(0)

flag = open("app/flag", "rb")
print(flag.read())
flag.close()

else:
print("Invalid choice!")
break

# gen_keys()
main()


做法:

该题生成了一个 BFV 同态加密的例子
choice=0 会给我们单项式$X^{a}$和$X^{b}$的密文 ciphertext_a 和 ciphertext_b
choice=1 会给我们生成一次 galois_key(只有一次)
elt 为 p 的 galois_key 可以建立映射$X^{a} \to X^{ap}$
题目是想让我们凑一个多项式的系数,使得这个系数满足

所以我们的galois_key的elt可以选择为度数-1,来获得 -a 和 -b
可以先对密文进行运算
得到 $X^{a-b}+X^{b-a}+X^{3a-b}+X^{3b-a}$的密文
然后凑另外一个多项式

两个多项式进行同态乘之后,常数项即为 pos
(原理,第二个多项式的X正好把原式的X消掉,然后同时多出来与原式X的次数相同的5次方项)
复现exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
import tenseal.sealapi as sealapi
from random import randint
from signal import alarm
import base64
import sage.all as sa
flag=b"W0w!!!You_actually_solved_the_BFV_Homorize!!!"
g = 5
poly_modulus_degree = 8192
plain_modulus = 163841

def gen_keys():
parms = sealapi.EncryptionParameters(sealapi.SCHEME_TYPE.BFV)
parms.set_poly_modulus_degree(poly_modulus_degree)
parms.set_plain_modulus(plain_modulus)
coeff = sealapi.CoeffModulus.BFVDefault(poly_modulus_degree, sealapi.SEC_LEVEL_TYPE.TC128)
parms.set_coeff_modulus(coeff)

ctx = sealapi.SEALContext(parms, True, sealapi.SEC_LEVEL_TYPE.TC128)

keygen = sealapi.KeyGenerator(ctx)
public_key = sealapi.PublicKey()
keygen.create_public_key(public_key)
secret_key = keygen.secret_key()

parms.save("./parms")
public_key.save("./public_key")
secret_key.save("./secret_key")

def load():
parms = sealapi.EncryptionParameters(sealapi.SCHEME_TYPE.BFV)
parms.load("./parms")

ctx = sealapi.SEALContext(parms, True, sealapi.SEC_LEVEL_TYPE.TC128)

public_key = sealapi.PublicKey()
public_key.load(ctx, "./public_key")

secret_key = sealapi.SecretKey()
secret_key.load(ctx, "./secret_key")
return ctx, public_key, secret_key

def gen_galois_keys(ctx, secret_key, elt):
keygen = sealapi.KeyGenerator(ctx, secret_key)
galois_keys = sealapi.GaloisKeys()
keygen.create_galois_keys(elt, galois_keys)
galois_keys.save("./galois_key")
return galois_keys

def gen_polynomial(a):
return '1x^' + str(a)

def f(a, b):
return (pow(g, a-b, plain_modulus) + pow(g, b-a, plain_modulus) + pow(g, 3*a-b, plain_modulus) + pow(g, a-3*b, plain_modulus))%plain_modulus

def check_result(ctx, decryptor, a, b, pos):
plaintext = sealapi.Plaintext()
ciphertext = sealapi.Ciphertext(ctx)
ciphertext.load(ctx, "./computation")
decryptor.decrypt(ciphertext, plaintext)
assert plaintext[pos] == f(a, b)

def send(filepath):
f = open(filepath, "rb")
data = base64.b64encode(f.read()).decode()
f.close()
print(data)

def recv(filepath):
try:
data = base64.b64decode(input())
except:
print("Invalid Base64!")
exit(0)

f = open(filepath, "wb")
f.write(data)
f.close()
def choose(choice,ctx,secret_key,decryptor,a,b):
try:
choice<4
except:
print("Invalid choice!")
exit(0)

if choice == 0:
print("Here Is Ciphertext_a:")
send("./ciphertext_a")
print("Here Is Ciphertext_b:")
send("./ciphertext_b")

elif choice == 1:
galois_used=0
if galois_used == 1:
print("No More!")
exit(0)
try:
elt = 8191
except:
print("Invalid input!")
exit(0)

try:
galois_key = gen_galois_keys(ctx, secret_key, [elt])
except:
print("Invalid galois!")
exit(0)

print("Here is your galois key:")
send("./galois_key")
galois_used = 1

elif choice == 2:
try:
pos = 0
assert pos in range(poly_modulus_degree)
except:
print("Invalid position!")
exit(0)

print("Give Me Your Computation")


try:
check_result(ctx, decryptor, a, b, pos)
except:
print("Incorret Answer!")
exit(0)


print(flag)


else:
print("Invalid choice!")


ctx, public_key, secret_key = load()
encryptor = sealapi.Encryptor(ctx, public_key)
decryptor = sealapi.Decryptor(ctx, secret_key)
a, b = [randint(1, poly_modulus_degree - 1) for _ in range(2)]
poly_a, poly_b = gen_polynomial(a), gen_polynomial(b)

plaintext_a, plaintext_b = sealapi.Plaintext(poly_a), sealapi.Plaintext(poly_b)
ciphertext_a, ciphertext_b = [sealapi.Ciphertext() for _ in range(2)]
encryptor.encrypt(plaintext_a, ciphertext_a)
encryptor.encrypt(plaintext_b, ciphertext_b)
ciphertext_a.save("./ciphertext_a")
ciphertext_b.save("./ciphertext_b")
choose(0,ctx,secret_key,decryptor,a,b)
choose(1,ctx,secret_key,decryptor,a,b)
PR=sa.PolynomialRing(sa.GF(plain_modulus),'x')
x=PR.gen()
mod=x**poly_modulus_degree+1
pol=0
for i in range(poly_modulus_degree-1):
pol+=-pow(5,i,plain_modulus)*x**(poly_modulus_degree-i)
pol=pol%mod
testx=str(pol)
print(testx)
galois_keys=sealapi.GaloisKeys()
galois_keys.load(ctx,'./galois_key')
evaluator = sealapi.Evaluator(ctx)
ciphertext_minus_a = sealapi.Ciphertext(ctx)
evaluator.apply_galois(ciphertext_a,8191,galois_keys,ciphertext_minus_a)
ciphertext_minus_b = sealapi.Ciphertext(ctx)
evaluator.apply_galois(ciphertext_b,8191,galois_keys,ciphertext_minus_b)

ciphertext_2a = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_a, ciphertext_a, ciphertext_2a)
ciphertext_3a = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_2a, ciphertext_a, ciphertext_3a)

ciphertext_2_minus_b = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_minus_b, ciphertext_minus_b, ciphertext_2_minus_b)
ciphertext_3_minus_b = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_2_minus_b, ciphertext_minus_b, ciphertext_3_minus_b)

ciphertext_3a_minus_b = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_3a, ciphertext_minus_b, ciphertext_3a_minus_b)

ciphertext_a_minus_3b = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_a, ciphertext_3_minus_b, ciphertext_a_minus_3b)

ciphertext_a_minus_b = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_a, ciphertext_minus_b, ciphertext_a_minus_b)

ciphertext_b_minus_a = sealapi.Ciphertext(ctx)
evaluator.multiply(ciphertext_b, ciphertext_minus_a, ciphertext_b_minus_a)
testx='27ffcx^8191+27fe8x^8190+27f84x^8189+27d90x^8188+273ccx^8187+242f8x^8186+14ed4x^8185+18a22x^8184+32a7x^8183+fd43x^8182+2724ex^8181+23b82x^8180+12986x^8179+cf9cx^8178+18e0bx^8177+4634x^8176+15f04x^8175+1db12x^8174+1c757x^8173+164b0x^8172+1f76ex^8171+25523x^8170+1a9abx^8169+d054x^8168+191a3x^8167+582cx^8166+1b8dcx^8165+11c49x^8164+8d6bx^8163+4316x^8162+14f6ex^8161+18d24x^8160+41b1x^8159+14875x^8158+16a47x^8157+21361x^8156+60e1x^8155+1e465x^8154+1f5f6x^8153+24dcbx^8152+184f3x^8151+18bcx^8150+7bacx^8149+26a5cx^8148+213c8x^8147+62e4x^8146+1ee74x^8145+22841x^8144+c941x^8143+16e44x^8142+22752x^8141+c496x^8140+156edx^8139+1b29fx^8138+fd18x^8137+27177x^8136+2374fx^8135+11487x^8134+66a1x^8133+20125x^8132+5b5x^8131+1c89x^8130+8eadx^8129+4960x^8128+16ee0x^8127+22a5ex^8126+d3d2x^8125+1a319x^8124+af7ax^8123+ed61x^8122+222e4x^8121+ae70x^8120+e82fx^8119+208eax^8118+2c8ex^8117+dec6x^8116+1d9ddx^8115+1c14ex^8114+14683x^8113+1608dx^8112+1e2bfx^8111+1edb8x^8110+22495x^8109+b6e5x^8108+11278x^8107+5c56x^8106+1cdaex^8105+18463x^8104+15ecx^8103+6d9cx^8102+2240cx^8101+b438x^8100+10517x^8099+1971x^8098+7f35x^8097+27c09x^8096+26c29x^8095+21cc9x^8094+8fe9x^8093+4f8cx^8092+18dbcx^8091+44a9x^8090+1574dx^8089+1b47fx^8088+10678x^8087+2056x^8086+a1aex^8085+a865x^8084+c9f8x^8083+171d7x^8082+23931x^8081+11df1x^8080+95b3x^8079+6c7ex^8078+21e76x^8077+984ax^8076+7971x^8075+25f35x^8074+1dc05x^8073+1cc16x^8072+17c6bx^8071+26e15x^8070+22665x^8069+bff5x^8068+13fc8x^8067+13ee6x^8066+13a7cx^8065+1246ax^8064+b610x^8063+10e4fx^8062+4789x^8061+165adx^8060+1fc5fx^8059+26dd8x^8058+22534x^8057+ba00x^8056+121ffx^8055+a9f9x^8054+d1dcx^8053+1994bx^8052+7e74x^8051+27844x^8050+25950x^8049+1be8cx^8048+138b9x^8047+11b9bx^8046+8a05x^8045+3218x^8044+fa78x^8043+26457x^8042+1f5afx^8041+24c68x^8040+17e04x^8039+27612x^8038+24e56x^8037+187aax^8036+264fx^8035+bf8bx^8034+13db6x^8033+1348cx^8032+106bax^8031+21a0x^8030+a820x^8029+c89fx^8028+16b1ax^8027+21780x^8026+757cx^8025+24b6cx^8024+17918x^8023+25d76x^8022+1d34ax^8021+1a06fx^8020+a228x^8019+aac7x^8018+d5e2x^8017+1ad69x^8016+e30ax^8015+1ef31x^8014+22bf2x^8013+dbb6x^8012+1ca8dx^8011+174bex^8010+247b4x^8009+16680x^8008+2007ex^8007+272x^8006+c3ax^8005+3d22x^8004+131aax^8003+f850x^8002+2598fx^8001+1bfc7x^8000+13ee0x^7999+13a5ex^7998+123d4x^7997+b322x^7996+ffa9x^7995+27e4cx^7994+27778x^7993+25554x^7992+1aaa0x^7991+d51dx^7990+1a990x^7989+cfcdx^7988+18f00x^7987+4afdx^7986+176f1x^7985+252b3x^7984+19d7bx^7983+9364x^7982+60f3x^7981+1e4bfx^7980+1f7b8x^7979+25695x^7978+1b0e5x^7977+f476x^7976+2464dx^7975+15f7dx^7974+1dd6fx^7973+1d328x^7972+19fc5x^7971+9ed6x^7970+9a2dx^7969+82e0x^7968+e5fx^7967+47dbx^7966+16747x^7965+20461x^7964+15e1x^7963+6d65x^7962+222f9x^7961+aed9x^7960+ea3cx^7959+2132bx^7958+5fd3x^7957+1df1fx^7956+1db98x^7955+1c9f5x^7954+171c6x^7953+238dcx^7952+11c48x^7951+8d66x^7950+42fdx^7949+14ef1x^7948+18ab3x^7947+357cx^7946+10b6cx^7945+391ax^7944+11d82x^7943+9388x^7942+61a7x^7941+1e843x^7940+2094cx^7939+2e78x^7938+e858x^7937+209b7x^7936+308fx^7935+f2cbx^7934+23df6x^7933+135cax^7932+10cf0x^7931+40aex^7930+14366x^7929+150fcx^7928+194eax^7927+688fx^7926+20acbx^7925+35f3x^7924+10dbfx^7923+44b9x^7922+1579dx^7921+1b60fx^7920+10e48x^7919+4766x^7918+164fex^7917+1f8f4x^7916+25cc1x^7915+1cfc1x^7914+18ec2x^7913+49c7x^7912+170e3x^7911+2346dx^7910+1061dx^7909+1e8fx^7908+98cbx^7907+7bf6x^7906+26bcex^7905+21b02x^7904+8706x^7903+231dx^7902+af91x^7901+edd4x^7900+22523x^7899+b9abx^7898+12056x^7897+a1acx^7896+a85bx^7895+c9c6x^7894+170ddx^7893+2344fx^7892+10587x^7891+1ba1x^7890+8a25x^7889+32b8x^7888+fd98x^7887+273f7x^7886+243cfx^7885+15307x^7884+19f21x^7883+9ba2x^7882+8a29x^7881+32ccx^7880+fdfcx^7879+275ebx^7878+24d93x^7877+183dbx^7876+1344x^7875+6054x^7874+1e1a4x^7873+1e831x^7872+208f2x^7871+2cb6x^7870+df8ex^7869+1ddc5x^7868+1d4d6x^7867+1a82bx^7866+c8d4x^7865+16c23x^7864+21cadx^7863+8f5dx^7862+4cd0x^7861+18010x^7860+4dx^7859+181x^7858+785x^7857+2599x^7856+bbfdx^7855+12bf0x^7854+dbaex^7853+1ca65x^7852+173f6x^7851+243ccx^7850+152f8x^7849+19ed6x^7848+9a2bx^7847+82d6x^7846+e2dx^7845+46e1x^7844+16265x^7843+1ebf7x^7842+21bd0x^7841+8b0cx^7840+373bx^7839+11427x^7838+64c1x^7837+1f7c5x^7836+256d6x^7835+1b22ax^7834+facfx^7833+2660ax^7832+1fe2ex^7831+276e3x^7830+2526bx^7829+19c13x^7828+8c5cx^7827+3dcbx^7826+134f7x^7825+108d1x^7824+2c13x^7823+dc5fx^7822+1cddax^7821+1853fx^7820+1a38x^7819+8318x^7818+f77x^7817+4d53x^7816+1829fx^7815+d18x^7814+4178x^7813+14758x^7812+164b6x^7811+1f78cx^7810+255b9x^7809+1ac99x^7808+defax^7807+1dae1x^7806+1c662x^7805+15fe7x^7804+1df81x^7803+1dd82x^7802+1d387x^7801+1a1a0x^7800+a81dx^7799+c890x^7798+16acfx^7797+21609x^7796+6e29x^7795+226cdx^7794+c1fdx^7793+149f0x^7792+171aex^7791+23864x^7790+119f0x^7789+81aex^7788+865x^7787+29f9x^7786+d1ddx^7785+19950x^7784+7e8dx^7783+278c1x^7782+25bc1x^7781+1cac1x^7780+175c2x^7779+24cc8x^7778+17fe4x^7777+27f72x^7776+27d36x^7775+2720ax^7774+23a2ex^7773+122e2x^7772+ae68x^7771+e807x^7770+20822x^7769+28a6x^7768+cb3ex^7767+17835x^7766+25907x^7765+1bd1fx^7764+13198x^7763+f7f6x^7762+257cdx^7761+1b6fdx^7760+112eex^7759+5ea4x^7758+1d934x^7757+1be01x^7756+13602x^7755+10e08x^7754+4626x^7753+15ebex^7752+1d9b4x^7751+1c081x^7750+14282x^7749+14c88x^7748+17ea6x^7747+2793cx^7746+25e28x^7745+1d6c4x^7744+1b1d1x^7743+f912x^7742+25d59x^7741+1d2b9x^7740+19d9ax^7739+93ffx^7738+63fax^7737+1f3e2x^7736+24367x^7735+150ffx^7734+194f9x^7733+68dax^7732+20c42x^7731+3d46x^7730+1325ex^7729+fbd4x^7728+26b23x^7727+217abx^7726+7653x^7725+24f9fx^7724+18e17x^7723+4670x^7722+16030x^7721+1e0eex^7720+1e4a3x^7719+1f72cx^7718+253d9x^7717+1a339x^7716+b01ax^7715+f081x^7714+23284x^7713+fc90x^7712+26ecfx^7711+22a07x^7710+d21fx^7709+19a9ax^7708+84ffx^7707+18fax^7706+7ce2x^7705+2706ax^7704+2320ex^7703+fa42x^7702+26349x^7701+1f069x^7700+2320ax^7699+fa2ex^7698+262e5x^7697+1ee75x^7696+22846x^7695+c95ax^7694+16ec1x^7693+229c3x^7692+d0cbx^7691+193f6x^7690+63cbx^7689+1f2f7x^7688+23ed0x^7687+13a0cx^7686+1223ax^7685+ab20x^7684+d79fx^7683+1b61ax^7682+10e7fx^7681+4879x^7680+16a5dx^7679+213cfx^7678+6307x^7677+1ef23x^7676+22bacx^7675+da58x^7674+1c3b7x^7673+15290x^7672+19ccex^7671+9003x^7670+500ex^7669+19046x^7668+515bx^7667+196c7x^7666+71e0x^7665+23960x^7664+11edcx^7663+9a4ax^7662+8371x^7661+1134x^7660+5604x^7659+1ae14x^7658+e661x^7657+1ffe4x^7656+27f71x^7655+27d31x^7654+271f1x^7653+239b1x^7652+12071x^7651+a233x^7650+aafex^7649+d6f5x^7648+1b2c8x^7647+fde5x^7646+27578x^7645+24b54x^7644+178a0x^7643+25b1ex^7642+1c792x^7641+165d7x^7640+1fd31x^7639+271f2x^7638+239b6x^7637+1208ax^7636+a2b0x^7635+ad6fx^7634+e32ax^7633+1efd1x^7632+22f12x^7631+eb56x^7630+218adx^7629+7b5dx^7628+268d1x^7627+20c11x^7626+3c51x^7625+12d95x^7624+e3e7x^7623+1f382x^7622+24187x^7621+1479fx^7620+16619x^7619+1fe7bx^7618+27864x^7617+259f0x^7616+1c1acx^7615+14859x^7614+169bbx^7613+210a5x^7612+5335x^7611+1a009x^7610+a02ax^7609+a0d1x^7608+a414x^7607+b463x^7606+105eex^7605+1da4x^7604+9434x^7603+6503x^7602+1f90fx^7601+25d48x^7600+1d264x^7599+19bf1x^7598+8bb2x^7597+3a79x^7596+1245dx^7595+b5cfx^7594+10d0ax^7593+4130x^7592+145f0x^7591+15daex^7590+1d464x^7589+1a5f1x^7588+bdb2x^7587+13479x^7586+1065bx^7585+1fc5x^7584+9ed9x^7583+9a3cx^7582+832bx^7581+fd6x^7580+4f2ex^7579+18be6x^7578+3b7bx^7577+12967x^7576+cf01x^7575+18b04x^7574+3711x^7573+11355x^7572+60a7x^7571+1e343x^7570+1f04cx^7569+23179x^7568+f759x^7567+254bcx^7566+1a7a8x^7565+c645x^7564+15f58x^7563+1dcb6x^7562+1cf8bx^7561+18db4x^7560+4481x^7559+15685x^7558+1b097x^7557+f2f0x^7556+23eafx^7555+13967x^7554+11f01x^7553+9b03x^7552+870ex^7551+2345x^7550+b059x^7549+f1bcx^7548+238abx^7547+11b53x^7546+889dx^7545+2b10x^7544+d750x^7543+1b48fx^7542+106c8x^7541+21e6x^7540+a97ex^7539+cf75x^7538+18d48x^7537+4265x^7536+14bf9x^7535+17bdbx^7534+26b45x^7533+21855x^7532+79a5x^7531+26039x^7530+1e119x^7529+1e57ax^7528+1fb5fx^7527+268d8x^7526+20c34x^7525+3d00x^7524+13100x^7523+f4fex^7522+248f5x^7521+16cc5x^7520+21fd7x^7519+9f2fx^7518+9beax^7517+8b91x^7516+39d4x^7515+12124x^7514+a5b2x^7513+bc79x^7512+12e5cx^7511+e7cax^7510+206f1x^7509+22b1x^7508+ad75x^7507+e348x^7506+1f067x^7505+23200x^7504+f9fcx^7503+261ebx^7502+1e993x^7501+20fdcx^7500+4f48x^7499+18c68x^7498+3e05x^7497+13619x^7496+10e7bx^7495+4865x^7494+169f9x^7493+211dbx^7492+5943x^7491+1be4fx^7490+13788x^7489+115a6x^7488+6c3cx^7487+21d2cx^7486+91d8x^7485+5937x^7484+1be13x^7483+1365cx^7482+10fcax^7481+4ef0x^7480+18ab0x^7479+356dx^7478+10b21x^7477+37a3x^7476+1162fx^7475+6ee9x^7474+22a8dx^7473+d4bdx^7472+1a7b0x^7471+c66dx^7470+16020x^7469+1e09ex^7468+1e313x^7467+1ef5cx^7466+22cc9x^7465+dfe9x^7464+1df8cx^7463+1ddb9x^7462+1d49ax^7461+1a6ffx^7460+c2f8x^7459+14ed7x^7458+18a31x^7457+32f2x^7456+febax^7455+279a1x^7454+26021x^7453+1e0a1x^7452+1e322x^7451+1efa7x^7450+22e40x^7449+e73cx^7448+2042bx^7447+14d3x^7446+681fx^7445+2089bx^7444+2b03x^7443+d70fx^7442+1b34ax^7441+1006fx^7440+229x^7439+acdx^7438+3601x^7437+10e05x^7436+4617x^7435+15e73x^7434+1d83dx^7433+1b92ex^7432+11de3x^7431+956dx^7430+6b20x^7429+217a0x^7428+761cx^7427+24e8cx^7426+188b8x^7425+2b95x^7424+d9e9x^7423+1c18cx^7422+147b9x^7421+1669bx^7420+20105x^7419+515x^7418+1969x^7417+7f0dx^7416+27b41x^7415+26841x^7414+20941x^7413+2e41x^7412+e745x^7411+20458x^7410+15b4x^7409+6c84x^7408+21e94x^7407+98e0x^7406+7c5fx^7405+26ddbx^7404+22543x^7403+ba4bx^7402+12376x^7401+b14cx^7400+f67bx^7399+25066x^7398+191fax^7397+59dfx^7396+1c15bx^7395+146c4x^7394+161d2x^7393+1e918x^7392+20d75x^7391+4345x^7390+15059x^7389+191bbx^7388+58a4x^7387+1bb34x^7386+12801x^7385+c803x^7384+1680ex^7383+20844x^7382+2950x^7381+ce90x^7380+188cfx^7379+2c08x^7378+dc28x^7377+1ccc7x^7376+17fe0x^7375+27f5ex^7374+27cd2x^7373+27016x^7372+2306ax^7371+f20ex^7370+23a45x^7369+12355x^7368+b0a7x^7367+f342x^7366+24049x^7365+14169x^7364+1470bx^7363+16335x^7362+1f007x^7361+23020x^7360+f09cx^7359+2330bx^7358+ff33x^7357+27bfex^7356+26bf2x^7355+21bb6x^7354+8a8ax^7353+34b1x^7352+10775x^7351+2547x^7350+ba63x^7349+123eex^7348+b3a4x^7347+10233x^7346+afdx^7345+36f1x^7344+112b5x^7343+5d87x^7342+1d3a3x^7341+1a22cx^7340+aad9x^7339+d63cx^7338+1af2bx^7337+ebd4x^7336+21b23x^7335+87abx^7334+2656x^7333+bfaex^7332+13e65x^7331+137f7x^7330+117d1x^7329+7713x^7328+2535fx^7327+1a0d7x^7326+a430x^7325+b4efx^7324+108aax^7323+2b50x^7322+d890x^7321+1bacfx^7320+12608x^7319+be26x^7318+136bdx^7317+111afx^7316+5869x^7315+1ba0dx^7314+1223ex^7313+ab34x^7312+d803x^7311+1b80ex^7310+11843x^7309+794dx^7308+25e81x^7307+1d881x^7306+1ba82x^7305+12487x^7304+b6a1x^7303+11124x^7302+55b2x^7301+1ac7ax^7300+de5fx^7299+1d7dax^7298+1b73fx^7297+11438x^7296+6516x^7295+1f96ex^7294+25f23x^7293+1dbabx^7292+1ca54x^7291+173a1x^7290+24223x^7289+14aabx^7288+17555x^7287+24aa7x^7286+1753fx^7285+24a39x^7284+17319x^7283+23f7bx^7282+13d63x^7281+132edx^7280+fe9fx^7279+2791ax^7278+25d7ex^7277+1d372x^7276+1a137x^7275+a610x^7274+be4fx^7273+1378ax^7272+115b0x^7271+6c6ex^7270+21e26x^7269+96bax^7268+71a1x^7267+23825x^7266+118b5x^7265+7b87x^7264+269a3x^7263+2102bx^7262+50d3x^7261+1941fx^7260+6498x^7259+1f6f8x^7258+252d5x^7257+19e25x^7256+96b6x^7255+718dx^7254+237c1x^7253+116c1x^7252+71c3x^7251+238cfx^7250+11c07x^7249+8c21x^7248+3ca4x^7247+12f34x^7246+ec02x^7245+21c09x^7244+8c29x^7243+3cccx^7242+12ffcx^7241+efeax^7240+22f91x^7239+edd1x^7238+22514x^7237+b960x^7236+11edfx^7235+9a59x^7234+83bcx^7233+12abx^7232+5d57x^7231+1d2b3x^7230+19d7cx^7229+9369x^7228+610cx^7227+1e53cx^7226+1fa29x^7225+262cax^7224+1edeex^7223+225a3x^7222+bc2bx^7221+12cd6x^7220+e02cx^7219+1e0dbx^7218+1e444x^7217+1f551x^7216+24a92x^7215+174d6x^7214+2482cx^7213+168d8x^7212+20c36x^7211+3d0ax^7210+13132x^7209+f5f8x^7208+24dd7x^7207+1852fx^7206+19e8x^7205+8188x^7204+7a7x^7203+2643x^7202+bf4fx^7201+13c8ax^7200+12eb0x^7199+e96ex^7198+20f25x^7197+4bb5x^7196+17a89x^7195+264abx^7194+1f753x^7193+2549cx^7192+1a708x^7191+c325x^7190+14fb8x^7189+18e96x^7188+48ebx^7187+16c97x^7186+21ef1x^7185+9ab1x^7184+8574x^7183+1b43x^7182+884fx^7181+298ax^7180+cfb2x^7179+18e79x^7178+485ax^7177+169c2x^7176+210c8x^7175+53e4x^7174+1a374x^7173+b141x^7172+f644x^7171+24f53x^7170+18c9bx^7169+3f04x^7168+13b14x^7167+12762x^7166+c4e8x^7165+15887x^7164+1baa1x^7163+12522x^7162+b9a8x^7161+12047x^7160+a161x^7159+a6e4x^7158+c273x^7157+14c3ex^7156+17d34x^7155+27202x^7154+23a06x^7153+1221ax^7152+aa80x^7151+d47fx^7150+1a67ax^7149+c05fx^7148+141dax^7147+14940x^7146+16e3ex^7145+22734x^7144+c400x^7143+153ffx^7142+1a3f9x^7141+b3dax^7140+10341x^7139+1043x^7138+514fx^7137+1968bx^7136+70b4x^7135+23384x^7134+10190x^7133+7cex^7132+2706x^7131+c31ex^7130+14f95x^7129+18de7x^7128+4580x^7127+15b80x^7126+1c97ex^7125+16f73x^7124+22d3dx^7123+e22dx^7122+1eae0x^7121+2165dx^7120+6fcdx^7119+22f01x^7118+eb01x^7117+21704x^7116+7310x^7115+23f50x^7114+13c8cx^7113+12ebax^7112+e9a0x^7111+2101fx^7110+5097x^7109+192f3x^7108+5ebcx^7107+1d9acx^7106+1c059x^7105+141bax^7104+148a0x^7103+16b1ex^7102+21794x^7101+75e0x^7100+24d60x^7099+182dcx^7098+e49x^7097+476dx^7096+16521x^7095+1f9a3x^7094+2602cx^7093+1e0d8x^7092+1e435x^7091+1f506x^7090+2491bx^7089+16d83x^7088+2238dx^7087+b1bdx^7086+f8b0x^7085+25b6fx^7084+1c927x^7083+16dc0x^7082+224bex^7081+b7b2x^7080+11679x^7079+705bx^7078+231c7x^7077+f8dfx^7076+25c5ax^7075+1cdbex^7074+184b3x^7073+177cx^7072+756cx^7071+24b1cx^7070+17788x^7069+255a6x^7068+1ac3ax^7067+dd1fx^7066+1d19ax^7065+197ffx^7064+77f8x^7063+257d8x^7062+1b734x^7061+11401x^7060+6403x^7059+1f40fx^7058+24448x^7057+15564x^7056+1aaf2x^7055+d6b7x^7054+1b192x^7053+f7d7x^7052+25732x^7051+1b3f6x^7050+103cbx^7049+12f5x^7048+5ec9x^7047+1d9edx^7046+1c19ex^7045+14813x^7044+1685dx^7043+209cfx^7042+3107x^7041+f523x^7040+249aex^7039+17062x^7038+231e8x^7037+f984x^7036+25f93x^7035+1dddbx^7034+1d544x^7033+1aa51x^7032+d392x^7031+1a1d9x^7030+a93ax^7029+ce21x^7028+186a4x^7027+2131x^7026+a5f5x^7025+bdc8x^7024+134e7x^7023+10881x^7022+2a83x^7021+d48fx^7020+1a6cax^7019+c1efx^7018+149aax^7017+17050x^7016+2318ex^7015+f7c2x^7014+256c9x^7013+1b1e9x^7012+f98ax^7011+25fb1x^7010+1de71x^7009+1d832x^7008+1b8f7x^7007+11cd0x^7006+900ex^7005+5045x^7004+19159x^7003+56bax^7002+1b1a2x^7001+f827x^7000+258c2x^6999+1bbc6x^6998+12adbx^6997+d645x^6996+1af58x^6995+ecb5x^6994+21f88x^6993+9da4x^6992+9433x^6991+64fex^6990+1f8f6x^6989+25ccbx^6988+1cff3x^6987+18fbcx^6986+4ea9x^6985+1894dx^6984+2e7ex^6983+e876x^6982+20a4dx^6981+337dx^6980+10171x^6979+733x^6978+23ffx^6977+b3fbx^6976+103e6x^6975+137cx^6974+616cx^6973+1e71cx^6972+20389x^6971+11a9x^6970+584dx^6969+1b981x^6968+11f82x^6967+9d88x^6966+93a7x^6965+6242x^6964+1eb4ax^6963+2186fx^6962+7a27x^6961+262c3x^6960+1edcbx^6959+224f4x^6958+b8c0x^6957+11bbfx^6956+8ab9x^6955+359cx^6954+10c0cx^6953+3c3ax^6952+12d22x^6951+e1a8x^6950+1e847x^6949+20960x^6948+2edcx^6947+ea4cx^6946+2137bx^6945+6163x^6944+1e6efx^6943+202a8x^6942+d44x^6941+4254x^6940+14ba4x^6939+17a32x^6938+262f8x^6937+1eed4x^6936+22a21x^6935+d2a1x^6934+19d24x^6933+91b1x^6932+5874x^6931+1ba44x^6930+12351x^6929+b093x^6928+f2dex^6927+23e55x^6926+137a5x^6925+11637x^6924+6f11x^6923+22b55x^6922+d8a5x^6921+1bb38x^6920+12815x^6919+c867x^6918+16a02x^6917+21208x^6916+5a24x^6915+1c2b4x^6914+14d81x^6913+18383x^6912+118cx^6911+57bcx^6910+1b6acx^6909+11159x^6908+56bbx^6907+1b1a7x^6906+f840x^6905+2593fx^6904+1be37x^6903+13710x^6902+1134ex^6901+6084x^6900+1e294x^6899+1ece1x^6898+22062x^6897+a1e6x^6896+a97dx^6895+cf70x^6894+18d2fx^6893+41e8x^6892+14988x^6891+16fa6x^6890+22e3cx^6889+e728x^6888+203c7x^6887+12dfx^6886+5e5bx^6885+1d7c7x^6884+1b6e0x^6883+1125dx^6882+5bcfx^6881+1cb0bx^6880+17734x^6879+25402x^6878+1a406x^6877+b41bx^6876+10486x^6875+169cx^6874+710cx^6873+2353cx^6872+10a28x^6871+32c6x^6870+fddex^6869+27555x^6868+24aa5x^6867+17535x^6866+24a07x^6865+1721fx^6864+23a99x^6863+124f9x^6862+b8dbx^6861+11c46x^6860+8d5cx^6859+42cbx^6858+14df7x^6857+185d1x^6856+1d12x^6855+915ax^6854+56c1x^6853+1b1c5x^6852+f8d6x^6851+25c2dx^6850+1ccddx^6849+1804ex^6848+183x^6847+78fx^6846+25cbx^6845+bcf7x^6844+130d2x^6843+f418x^6842+24477x^6841+1564fx^6840+1af89x^6839+edaax^6838+22451x^6837+b591x^6836+10bd4x^6835+3b22x^6834+127aax^6833+c650x^6832+15f8fx^6831+1ddc9x^6830+1d4eax^6829+1a88fx^6828+cac8x^6827+175e7x^6826+24d81x^6825+18381x^6824+1182x^6823+578ax^6822+1b5b2x^6821+10c77x^6820+3e51x^6819+13795x^6818+115e7x^6817+6d81x^6816+22385x^6815+b195x^6814+f7e8x^6813+25787x^6812+1b59fx^6811+10c18x^6810+3c76x^6809+12e4ex^6808+e784x^6807+20593x^6806+1bdbx^6805+8b47x^6804+3862x^6803+119eax^6802+8190x^6801+7cfx^6800+270bx^6799+c337x^6798+15012x^6797+19058x^6796+51b5x^6795+19889x^6794+7aaax^6793+26552x^6792+1fa96x^6791+264ebx^6790+1f893x^6789+25adcx^6788+1c648x^6787+15f65x^6786+1dcf7x^6785+1d0d0x^6784+1940dx^6783+643ex^6782+1f536x^6781+24a0bx^6780+17233x^6779+23afdx^6778+126edx^6777+c29fx^6776+14d1ax^6775+18180x^6774+77dx^6773+2571x^6772+bb35x^6771+12808x^6770+c826x^6769+168bdx^6768+20bafx^6767+3a67x^6766+12403x^6765+b40dx^6764+10440x^6763+153ex^6762+6a36x^6761+2130ex^6760+5f42x^6759+1dc4ax^6758+1cd6fx^6757+18328x^6756+fc5x^6755+4ed9x^6754+18a3dx^6753+332ex^6752+ffe6x^6751+27f7dx^6750+27d6dx^6749+2731dx^6748+23f8dx^6747+13dbdx^6746+134afx^6745+10769x^6744+250bx^6743+b937x^6742+11e12x^6741+9658x^6740+6fb7x^6739+22e93x^6738+e8dbx^6737+20c46x^6736+3d5ax^6735+132c2x^6734+fdc8x^6733+274e7x^6732+2487fx^6731+16a77x^6730+21451x^6729+6591x^6728+1fbd5x^6727+26b26x^6726+217bax^6725+769ex^6724+25116x^6723+1956ax^6722+6b0fx^6721+2174bx^6720+7473x^6719+2463fx^6718+15f37x^6717+1dc11x^6716+1cc52x^6715+17d97x^6714+273f1x^6713+243b1x^6712+15271x^6711+19c33x^6710+8cfcx^6709+40ebx^6708+14497x^6707+156f1x^6706+1b2b3x^6705+fd7cx^6704+2736bx^6703+24113x^6702+1455bx^6701+15ac5x^6700+1c5d7x^6699+15d30x^6698+1d1eex^6697+199a3x^6696+802cx^6695+dbx^6694+447x^6693+1563x^6692+6aefx^6691+216abx^6690+7153x^6689+2369fx^6688+11117x^6687+5571x^6686+1ab35x^6685+d806x^6684+1b81dx^6683+1188ex^6682+7ac4x^6681+265d4x^6680+1fd20x^6679+2719dx^6678+2380dx^6677+1183dx^6676+792fx^6675+25debx^6674+1d593x^6673+1abdcx^6672+db49x^6671+1c86cx^6670+16a19x^6669+2127bx^6668+5c63x^6667+1cdefx^6666+185a8x^6665+1c45x^6664+8d59x^6663+42bcx^6662+14dacx^6661+1845ax^6660+15bfx^6659+6cbbx^6658+21fa7x^6657+9e3fx^6656+973ax^6655+7421x^6654+244a5x^6653+15735x^6652+1b407x^6651+10420x^6650+149ex^6649+6716x^6648+2036ex^6647+1122x^6646+55aax^6645+1ac52x^6644+dd97x^6643+1d3f2x^6642+1a3b7x^6641+b290x^6640+fccfx^6639+2700ax^6638+2302ex^6637+f0e2x^6636+23469x^6635+10609x^6634+1e2bx^6633+96d7x^6632+7232x^6631+23afax^6630+126dex^6629+c254x^6628+14ba3x^6627+17a2dx^6626+262dfx^6625+1ee57x^6624+227b0x^6623+c66cx^6622+1601bx^6621+1e085x^6620+1e296x^6619+1ecebx^6618+22094x^6617+a2e0x^6616+ae5fx^6615+e7dax^6614+20741x^6613+2441x^6612+b545x^6611+10a58x^6610+33b6x^6609+1028ex^6608+cc4x^6607+3fd4x^6606+13f24x^6605+13bb2x^6604+12a78x^6603+d456x^6602+1a5adx^6601+bc5ex^6600+12dd5x^6599+e527x^6598+1f9c2x^6597+260c7x^6596+1e3dfx^6595+1f358x^6594+240b5x^6593+14385x^6592+15197x^6591+197f1x^6590+77b2x^6589+2567ax^6588+1b05ex^6587+f1d3x^6586+2391ex^6585+11d92x^6584+93d8x^6583+6337x^6582+1f013x^6581+2305cx^6580+f1c8x^6579+238e7x^6578+11c7fx^6577+8e79x^6576+485cx^6575+169ccx^6574+210fax^6573+54dex^6572+1a856x^6571+c9abx^6570+17056x^6569+231acx^6568+f858x^6567+259b7x^6566+1c08fx^6565+142c8x^6564+14de6x^6563+1857cx^6562+1b69x^6561+890dx^6560+2d40x^6559+e240x^6558+1eb3fx^6557+21838x^6556+7914x^6555+25d64x^6554+1d2f0x^6553+19eadx^6552+995ex^6551+7ed5x^6550+27a29x^6549+262c9x^6548+1ede9x^6547+2258ax^6546+bbaex^6545+12a65x^6544+d3f7x^6543+1a3d2x^6542+b317x^6541+ff72x^6540+27d39x^6539+27219x^6538+23a79x^6537+12459x^6536+b5bbx^6535+10ca6x^6534+3f3cx^6533+13c2cx^6532+12cdax^6531+e040x^6530+1e13fx^6529+1e638x^6528+1ff15x^6527+27b66x^6526+268fax^6525+20cdex^6524+4052x^6523+1419ax^6522+14800x^6521+167fex^6520+207f4x^6519+27c0x^6518+c6c0x^6517+161bfx^6516+1e8b9x^6515+20b9ax^6514+39fex^6513+121f6x^6512+a9ccx^6511+d0fbx^6510+194e6x^6509+687bx^6508+20a67x^6507+33ffx^6506+103fbx^6505+13e5x^6504+6379x^6503+1f15dx^6502+236cex^6501+11202x^6500+5a08x^6499+1c228x^6498+14ac5x^6497+175d7x^6496+24d31x^6495+181f1x^6494+9b2x^6493+307ax^6492+f262x^6491+23be9x^6490+12b89x^6489+d9abx^6488+1c056x^6487+141abx^6486+14855x^6485+169a7x^6484+21041x^6483+5141x^6482+19645x^6481+6f56x^6480+22caex^6479+df62x^6478+1dce9x^6477+1d08ax^6476+192afx^6475+5d68x^6474+1d308x^6473+19f25x^6472+9bb6x^6471+8a8dx^6470+34c0x^6469+107c0x^6468+26bex^6467+c1b6x^6466+1488dx^6465+16abfx^6464+215b9x^6463+6c99x^6462+21efdx^6461+9aedx^6460+86a0x^6459+211fx^6458+a59bx^6457+bc06x^6456+12c1dx^6455+dc8fx^6454+1cecax^6453+189efx^6452+31a8x^6451+f848x^6450+25967x^6449+1beffx^6448+13af8x^6447+126d6x^6446+c22cx^6445+14adbx^6444+17645x^6443+24f57x^6442+18cafx^6441+3f68x^6440+13d08x^6439+13126x^6438+f5bcx^6437+24cabx^6436+17f53x^6435+27c9dx^6434+26f0dx^6433+22b3dx^6432+d82dx^6431+1b8e0x^6430+11c5dx^6429+8dcfx^6428+450ax^6427+15932x^6426+1bdf8x^6425+135d5x^6424+10d27x^6423+41c1x^6422+148c5x^6421+16bd7x^6420+21b31x^6419+87f1x^6418+27b4x^6417+c684x^6416+16093x^6415+1e2ddx^6414+1ee4ex^6413+22783x^6412+c58bx^6411+15bb6x^6410+1ca8cx^6409+174b9x^6408+2479bx^6407+16603x^6406+1fe0dx^6405+2763ex^6404+24f32x^6403+18bf6x^6402+3bcbx^6401+12af7x^6400+d6d1x^6399+1b214x^6398+fa61x^6397+263e4x^6396+1f370x^6395+2412dx^6394+145ddx^6393+15d4fx^6392+1d289x^6391+19caax^6390+8f4fx^6389+4c8ax^6388+17eb2x^6387+27978x^6386+25f54x^6385+1dca0x^6384+1cf1dx^6383+18b8ex^6382+39c3x^6381+120cfx^6380+a409x^6379+b42cx^6378+104dbx^6377+1845x^6376+7959x^6375+25ebdx^6374+1d9adx^6373+1c05ex^6372+141d3x^6371+1491dx^6370+16d8fx^6369+223c9x^6368+b2e9x^6367+fe8cx^6366+278bbx^6365+25ba3x^6364+1ca2bx^6363+172d4x^6362+23e22x^6361+136a6x^6360+1113cx^6359+562ax^6358+1aed2x^6357+ea17x^6356+21272x^6355+5c36x^6354+1cd0ex^6353+18143x^6352+64cx^6351+1f7cx^6350+9d6cx^6349+931bx^6348+5f86x^6347+1dd9ex^6346+1d413x^6345+1a45cx^6344+b5c9x^6343+10cecx^6342+409ax^6341+14302x^6340+14f08x^6339+18b26x^6338+37bbx^6337+116a7x^6336+7141x^6335+23645x^6334+10f55x^6333+4ca7x^6332+17f43x^6331+27c4dx^6330+26d7dx^6329+2236dx^6328+b11dx^6327+f590x^6326+24bcfx^6325+17b07x^6324+26721x^6323+203a1x^6322+1221x^6321+5aa5x^6320+1c539x^6319+15a1ax^6318+1c280x^6317+14c7dx^6316+17e6fx^6315+27829x^6314+258c9x^6313+1bbe9x^6312+12b8ax^6311+d9b0x^6310+1c06fx^6309+14228x^6308+14ac6x^6307+175dcx^6306+24d4ax^6305+1826ex^6304+c23x^6303+3cafx^6302+12f6bx^6301+ed15x^6300+22168x^6299+a704x^6298+c313x^6297+14f5ex^6296+18cd4x^6295+4021x^6294+140a5x^6293+14337x^6292+15011x^6291+19053x^6290+519cx^6289+1980cx^6288+7839x^6287+2591dx^6286+1bd8dx^6285+133bex^6284+102b4x^6283+d82x^6282+438ax^6281+151b2x^6280+19878x^6279+7a55x^6278+263a9x^6277+1f249x^6276+23b6ax^6275+1290ex^6274+cd44x^6273+18253x^6272+b9cx^6271+3a0cx^6270+1223cx^6269+ab2ax^6268+d7d1x^6267+1b714x^6266+11361x^6265+60e3x^6264+1e46fx^6263+1f628x^6262+24ec5x^6261+189d5x^6260+3126x^6259+f5bex^6258+24cb5x^6257+17f85x^6256+27d97x^6255+273efx^6254+243a7x^6253+1523fx^6252+19b39x^6251+881ax^6250+2881x^6249+ca85x^6248+17498x^6247+246f6x^6246+162cax^6245+1edf0x^6244+225adx^6243+bc5dx^6242+12dd0x^6241+e50ex^6240+1f945x^6239+25e56x^6238+1d7aax^6237+1b64fx^6236+10f88x^6235+4da6x^6234+1843ex^6233+1533x^6232+69ffx^6231+211fbx^6230+59e3x^6229+1c16fx^6228+14728x^6227+163c6x^6226+1f2dcx^6225+23e49x^6224+13769x^6223+1150bx^6222+6935x^6221+20e09x^6220+4629x^6219+15ecdx^6218+1d9ffx^6217+1c1f8x^6216+149d5x^6215+17127x^6214+235c1x^6213+10cc1x^6212+3fc3x^6211+13ecfx^6210+13a09x^6209+1222bx^6208+aad5x^6207+d628x^6206+1aec7x^6205+e9e0x^6204+2115fx^6203+56d7x^6202+1b233x^6201+fafcx^6200+266ebx^6199+20293x^6198+cdbx^6197+4047x^6196+14163x^6195+146edx^6194+1629fx^6193+1ed19x^6192+2217ax^6191+a75ex^6190+c4d5x^6189+15828x^6188+1b8c6x^6187+11bdbx^6186+8b45x^6185+3858x^6184+119b8x^6183+8096x^6182+2edx^6181+ea1x^6180+4925x^6179+16db9x^6178+2249bx^6177+b703x^6176+1130ex^6175+5f44x^6174+1dc54x^6173+1cda1x^6172+18422x^6171+14a7x^6170+6743x^6169+2044fx^6168+1587x^6167+6ba3x^6166+21a2fx^6165+82e7x^6164+e82x^6163+488ax^6162+16ab2x^6161+21578x^6160+6b54x^6159+218a4x^6158+7b30x^6157+267f0x^6156+207acx^6155+2658x^6154+bfb8x^6153+13e97x^6152+138f1x^6151+11cb3x^6150+8f7dx^6149+4d70x^6148+18330x^6147+fedx^6146+4fa1x^6145+18e25x^6144+46b6x^6143+1618ex^6142+1e7c4x^6141+206d1x^6140+2211x^6139+aa55x^6138+d3a8x^6137+1a247x^6136+ab60x^6135+d8dfx^6134+1bc5ax^6133+12dbfx^6132+e4b9x^6131+1f79cx^6130+25609x^6129+1ae29x^6128+e6cax^6127+201f1x^6126+9b1x^6125+3075x^6124+f249x^6123+23b6cx^6122+12918x^6121+cd76x^6120+1834dx^6119+107ex^6118+5276x^6117+19c4ex^6116+8d83x^6115+438ex^6114+151c6x^6113+198dcx^6112+7c49x^6111+26d6dx^6110+2231dx^6109+af8dx^6108+edc0x^6107+224bfx^6106+b7b7x^6105+11692x^6104+70d8x^6103+23438x^6102+10514x^6101+1962x^6100+7eeax^6099+27a92x^6098+264d6x^6097+1f82ax^6096+258cfx^6095+1bc07x^6094+12c20x^6093+dc9ex^6092+1cf15x^6091+18b66x^6090+38fbx^6089+11ce7x^6088+9081x^6087+5284x^6086+19c94x^6085+8ee1x^6084+4a64x^6083+173f4x^6082+243c2x^6081+152c6x^6080+19ddcx^6079+9549x^6078+6a6cx^6077+2141cx^6076+6488x^6075+1f6a8x^6074+25145x^6073+19655x^6072+6fa6x^6071+22e3ex^6070+e732x^6069+203f9x^6068+13d9x^6067+633dx^6066+1f031x^6065+230f2x^6064+f4b6x^6063+2478dx^6062+165bdx^6061+1fcafx^6060+26f68x^6059+22d04x^6058+e110x^6057+1e54fx^6056+1fa88x^6055+264a5x^6054+1f735x^6053+25406x^6052+1a41ax^6051+b47fx^6050+1067ax^6049+2060x^6048+a1e0x^6047+a95fx^6046+cedax^6045+18a41x^6044+3342x^6043+1004ax^6042+170x^6041+730x^6040+23f0x^6039+b3b0x^6038+1026fx^6037+c29x^6036+3ccdx^6035+13001x^6034+f003x^6033+2300ex^6032+f042x^6031+23149x^6030+f669x^6029+2500cx^6028+19038x^6027+5115x^6026+19569x^6025+6b0ax^6024+21732x^6023+73f6x^6022+243cex^6021+15302x^6020+19f08x^6019+9b25x^6018+87b8x^6017+2697x^6016+c0f3x^6015+144bex^6014+157b4x^6013+1b682x^6012+11087x^6011+52a1x^6010+19d25x^6009+91b6x^6008+588dx^6007+1bac1x^6006+125c2x^6005+bcc8x^6004+12fe7x^6003+ef81x^6002+22d84x^6001+e390x^6000+1f1cfx^5999+23908x^5998+11d24x^5997+91b2x^5996+5879x^5995+1ba5dx^5994+123cex^5993+b304x^5992+ff13x^5991+27b5ex^5990+268d2x^5989+20c16x^5988+3c6ax^5987+12e12x^5986+e658x^5985+1ffb7x^5984+27e90x^5983+278ccx^5982+25bf8x^5981+1cbd4x^5980+17b21x^5979+267a3x^5978+2062bx^5977+1ed3x^5976+9a1fx^5975+829ax^5974+d01x^5973+4105x^5972+14519x^5971+1597bx^5970+1bf65x^5969+13cf6x^5968+130ccx^5967+f3fax^5966+243e1x^5965+15361x^5964+1a0e3x^5963+a46cx^5962+b61bx^5961+10e86x^5960+489cx^5959+16b0cx^5958+2173ax^5957+741ex^5956+24496x^5955+156eax^5954+1b290x^5953+fccdx^5952+27000x^5951+22ffcx^5950+efe8x^5949+22f87x^5948+ed9fx^5947+2241ax^5946+b47ex^5945+10675x^5944+2047x^5943+a163x^5942+a6eex^5941+c2a5x^5940+14d38x^5939+18216x^5938+a6bx^5937+3417x^5936+10473x^5935+163dx^5934+6f31x^5933+22bf5x^5932+dbc5x^5931+1cad8x^5930+17635x^5929+24f07x^5928+18b1fx^5927+3798x^5926+115f8x^5925+6dd6x^5924+2252ex^5923+b9e2x^5922+12169x^5921+a70bx^5920+c336x^5919+1500dx^5918+1903fx^5917+5138x^5916+19618x^5915+6e75x^5914+22849x^5913+c969x^5912+16f0cx^5911+22b3ax^5910+d81ex^5909+1b895x^5908+11ae6x^5907+867cx^5906+206bx^5905+a217x^5904+aa72x^5903+d439x^5902+1a51cx^5901+b989x^5900+11facx^5899+9e5ax^5898+97c1x^5897+76c4x^5896+251d4x^5895+19920x^5894+7d9dx^5893+27411x^5892+24451x^5891+15591x^5890+1abd3x^5889+db1cx^5888+1c78bx^5887+165b4x^5886+1fc82x^5885+26e87x^5884+2289fx^5883+cb17x^5882+17772x^5881+25538x^5880+1aa14x^5879+d261x^5878+19be4x^5877+8b71x^5876+3934x^5875+11e04x^5874+9612x^5873+6e59x^5872+227bdx^5871+c6adx^5870+16160x^5869+1e6dex^5868+20253x^5867+b9bx^5866+3a07x^5865+12223x^5864+aaadx^5863+d560x^5862+1aadfx^5861+d658x^5860+1afb7x^5859+ee90x^5858+228cfx^5857+cc07x^5856+17c22x^5855+26ca8x^5854+21f44x^5853+9c50x^5852+8d8fx^5851+43cax^5850+152f2x^5849+19eb8x^5848+9995x^5847+7fe8x^5846+27f88x^5845+27da4x^5844+27430x^5843+244ecx^5842+15898x^5841+1baf6x^5840+126cbx^5839+c1f5x^5838+149c8x^5837+170e6x^5836+2347cx^5835+10668x^5834+2006x^5833+a01ex^5832+a095x^5831+a2e8x^5830+ae87x^5829+e8a2x^5828+20b29x^5827+37c9x^5826+116edx^5825+729fx^5824+23d1bx^5823+13183x^5822+f78dx^5821+255c0x^5820+1acbcx^5819+dfa9x^5818+1de4cx^5817+1d779x^5816+1b55ax^5815+10abfx^5814+35b9x^5813+10c9dx^5812+3f0fx^5811+13b4bx^5810+12875x^5809+ca47x^5808+17362x^5807+240e8x^5806+14484x^5805+15692x^5804+1b0d8x^5803+f435x^5802+24508x^5801+15924x^5800+1bdb2x^5799+13477x^5798+10651x^5797+1f93x^5796+9ddfx^5795+955ax^5794+6ac1x^5793+215c5x^5792+6cd5x^5791+22029x^5790+a0c9x^5789+a3ecx^5788+b39bx^5787+10206x^5786+a1cx^5785+328cx^5784+fcbcx^5783+26fabx^5782+22e53x^5781+e79bx^5780+20606x^5779+1e1ax^5778+9682x^5777+7089x^5776+232adx^5775+fd5dx^5774+272d0x^5773+23e0cx^5772+13638x^5771+10f16x^5770+4b6cx^5769+1791cx^5768+25d8ax^5767+1d3aex^5766+1a263x^5765+abecx^5764+db9bx^5763+1ca06x^5762+1721bx^5761+23a85x^5760+12495x^5759+b6e7x^5758+11282x^5757+5c88x^5756+1cea8x^5755+18945x^5754+2e56x^5753+e7aex^5752+20665x^5751+1ff5x^5750+9fc9x^5749+9eecx^5748+9a9bx^5747+8506x^5746+191dx^5745+7d91x^5744+273d5x^5743+24325x^5742+14fb5x^5741+18e87x^5740+48a0x^5739+16b20x^5738+2179ex^5737+7612x^5736+24e5ax^5735+187bex^5734+26b3x^5733+c17fx^5732+1477ax^5731+16560x^5730+1fadex^5729+26653x^5728+1ff9bx^5727+27e04x^5726+27610x^5725+24e4cx^5724+18778x^5723+2555x^5722+baa9x^5721+1254cx^5720+ba7ax^5719+12461x^5718+b5e3x^5717+10d6ex^5716+4324x^5715+14fb4x^5714+18e82x^5713+4887x^5712+16aa3x^5711+2152dx^5710+69ddx^5709+21151x^5708+5691x^5707+1b0d5x^5706+f426x^5705+244bdx^5704+157adx^5703+1b65fx^5702+10fd8x^5701+4f36x^5700+18c0ex^5699+3c43x^5698+12d4fx^5697+e289x^5696+1ecacx^5695+21f59x^5694+9cb9x^5693+8f9cx^5692+4e0bx^5691+18637x^5690+1f10x^5689+9b50x^5688+888fx^5687+2acax^5686+d5f2x^5685+1adb9x^5684+e49ax^5683+1f701x^5682+25302x^5681+19f06x^5680+9b1bx^5679+8786x^5678+259dx^5677+bc11x^5676+12c54x^5675+dda2x^5674+1d429x^5673+1a4cax^5672+b7efx^5671+117aax^5670+7650x^5669+24f90x^5668+18dccx^5667+44f9x^5666+158ddx^5665+1bc4fx^5664+12d88x^5663+e3a6x^5662+1f23dx^5661+23b2ex^5660+127e2x^5659+c768x^5658+16507x^5657+1f921x^5656+25da2x^5655+1d426x^5654+1a4bbx^5653+b7a4x^5652+11633x^5651+6efdx^5650+22af1x^5649+d6b1x^5648+1b174x^5647+f741x^5646+25444x^5645+1a550x^5644+ba8dx^5643+124c0x^5642+b7bex^5641+116b5x^5640+7187x^5639+237a3x^5638+1162bx^5637+6ed5x^5636+22a29x^5635+d2c9x^5634+19decx^5633+9599x^5632+6bfcx^5631+21becx^5630+8b98x^5629+39f7x^5628+121d3x^5627+a91dx^5626+cd90x^5625+183cfx^5624+1308x^5623+5f28x^5622+1dbc8x^5621+1cae5x^5620+17676x^5619+2504cx^5618+19178x^5617+5755x^5616+1b4a9x^5615+1074ax^5614+2470x^5613+b630x^5612+10eefx^5611+4aa9x^5610+1754dx^5609+24a7fx^5608+17477x^5607+24651x^5606+15f91x^5605+1ddd3x^5604+1d51cx^5603+1a989x^5602+cfaax^5601+18e51x^5600+4792x^5599+165dax^5598+1fd40x^5597+2723dx^5596+23b2dx^5595+127ddx^5594+c74fx^5593+1648ax^5592+1f6b0x^5591+2516dx^5590+1971dx^5589+738ex^5588+241c6x^5587+148dax^5586+16c40x^5585+21d3ex^5584+9232x^5583+5af9x^5582+1c6ddx^5581+1624ex^5580+1eb84x^5579+21991x^5578+7fd1x^5577+27f15x^5576+27b65x^5575+268f5x^5574+20cc5x^5573+3fd5x^5572+13f29x^5571+13bcbx^5570+12af5x^5569+d6c7x^5568+1b1e2x^5567+f967x^5566+25f02x^5565+1db06x^5564+1c71bx^5563+16384x^5562+1f192x^5561+237d7x^5560+1172fx^5559+73e9x^5558+2438dx^5557+151bdx^5556+198afx^5555+7b68x^5554+26908x^5553+20d24x^5552+41b0x^5551+14870x^5550+16a2ex^5549+212e4x^5548+5e70x^5547+1d830x^5546+1b8edx^5545+11c9ex^5544+8f14x^5543+4b63x^5542+178efx^5541+25ca9x^5540+1cf49x^5539+18c6ax^5538+3e0fx^5537+1364bx^5536+10f75x^5535+4d47x^5534+18263x^5533+becx^5532+3b9cx^5531+12a0cx^5530+d23ax^5529+19b21x^5528+87a2x^5527+2629x^5526+becdx^5525+13a00x^5524+121fex^5523+a9f4x^5522+d1c3x^5521+198cex^5520+7c03x^5519+26c0fx^5518+21c47x^5517+8d5fx^5516+42dax^5515+14e42x^5514+18748x^5513+2465x^5512+b5f9x^5511+10ddcx^5510+454ax^5509+15a72x^5508+1c438x^5507+15515x^5506+1a967x^5505+cf00x^5504+18affx^5503+36f8x^5502+112d8x^5501+5e36x^5500+1d70ex^5499+1b343x^5498+1004cx^5497+17ax^5496+762x^5495+24eax^5494+b892x^5493+11ad9x^5492+863bx^5491+1f26x^5490+9bbex^5489+8ab5x^5488+3588x^5487+10ba8x^5486+3a46x^5485+1235ex^5484+b0d4x^5483+f423x^5482+244aex^5481+15762x^5480+1b4e8x^5479+10885x^5478+2a97x^5477+d4f3x^5476+1a8bex^5475+cbb3x^5474+17a7ex^5473+26474x^5472+1f640x^5471+24f3dx^5470+18c2dx^5469+3cdex^5468+13056x^5467+f1acx^5466+2385bx^5465+119c3x^5464+80cdx^5463+400x^5462+1400x^5461+6400x^5460+1f400x^5459+243fdx^5458+153edx^5457+1a39fx^5456+b218x^5455+fa77x^5454+26452x^5453+1f596x^5452+24bebx^5451+17b93x^5450+269ddx^5449+2114dx^5448+567dx^5447+1b071x^5446+f232x^5445+23af9x^5444+126d9x^5443+c23bx^5442+14b26x^5441+177bcx^5440+256aax^5439+1b14ex^5438+f683x^5437+2508ex^5436+192c2x^5435+5dc7x^5434+1d4e3x^5433+1a86cx^5432+ca19x^5431+1727cx^5430+23c6ax^5429+12e0ex^5428+e644x^5427+1ff53x^5426+27c9cx^5425+26f08x^5424+22b24x^5423+d7b0x^5422+1b66fx^5421+11028x^5420+50c6x^5419+193dex^5418+6353x^5417+1f09fx^5416+23318x^5415+ff74x^5414+27d43x^5413+2724bx^5412+23b73x^5411+1293bx^5410+ce25x^5409+186b8x^5408+2195x^5407+a7e9x^5406+c78cx^5405+165bbx^5404+1fca5x^5403+26f36x^5402+22c0ax^5401+dc2ex^5400+1cce5x^5399+18076x^5398+24bx^5397+b77x^5396+3953x^5395+11e9fx^5394+9919x^5393+7d7cx^5392+2736cx^5391+24118x^5390+14574x^5389+15b42x^5388+1c848x^5387+16965x^5386+20ef7x^5385+4acfx^5384+1760bx^5383+24e35x^5382+18705x^5381+2316x^5380+af6ex^5379+ed25x^5378+221b8x^5377+a894x^5376+cae3x^5375+1766ex^5374+25024x^5373+190b0x^5372+536dx^5371+1a121x^5370+a5a2x^5369+bc29x^5368+12cccx^5367+dffax^5366+1dfe1x^5365+1df62x^5364+1dce7x^5363+1d080x^5362+1927dx^5361+5c6ex^5360+1ce26x^5359+186bbx^5358+21a4x^5357+a834x^5356+c903x^5355+16d0ex^5354+22144x^5353+a650x^5352+bf8fx^5351+13dcax^5350+134f0x^5349+108aex^5348+2b64x^5347+d8f4x^5346+1bcc3x^5345+12fccx^5344+eefax^5343+22ae1x^5342+d661x^5341+1afe4x^5340+ef71x^5339+22d34x^5338+e200x^5337+1e9ffx^5336+211f8x^5335+59d4x^5334+1c124x^5333+145b1x^5332+15c73x^5331+1ce3dx^5330+1872ex^5329+23e3x^5328+b36fx^5327+1012ax^5326+5d0x^5325+1d10x^5324+9150x^5323+568fx^5322+1b0cbx^5321+f3f4x^5320+243c3x^5319+152cbx^5318+19df5x^5317+95c6x^5316+6cddx^5315+22051x^5314+a191x^5313+a7d4x^5312+c723x^5311+163aex^5310+1f264x^5309+23bf1x^5308+12bb1x^5307+da73x^5306+1c43ex^5305+15533x^5304+1a9fdx^5303+d1eex^5302+199a5x^5301+8036x^5300+10dx^5299+541x^5298+1a45x^5297+8359x^5296+10bcx^5295+53acx^5294+1a25cx^5293+abc9x^5292+daecx^5291+1c69bx^5290+16104x^5289+1e512x^5288+1f957x^5287+25eb0x^5286+1d96cx^5285+1bf19x^5284+13b7ax^5283+12960x^5282+cedex^5281+18a55x^5280+33a6x^5279+1023ex^5278+b34x^5277+3804x^5276+11814x^5275+7862x^5274+259eax^5273+1c18ex^5272+147c3x^5271+166cdx^5270+201ffx^5269+9f7x^5268+31d3x^5267+f91fx^5266+25d9ax^5265+1d3fex^5264+1a3f3x^5263+b3bcx^5262+102abx^5261+d55x^5260+42a9x^5259+14d4dx^5258+1827fx^5257+c78x^5256+3e58x^5255+137b8x^5254+11696x^5253+70ecx^5252+2349cx^5251+10708x^5250+2326x^5249+afbex^5248+eeb5x^5247+22988x^5246+cfa4x^5245+18e33x^5244+46fcx^5243+162ecx^5242+1ee9ax^5241+228ffx^5240+ccf7x^5239+180d2x^5238+417x^5237+1473x^5236+663fx^5235+1ff3bx^5234+27c24x^5233+26cb0x^5232+21f6cx^5231+9d18x^5230+9177x^5229+5752x^5228+1b49ax^5227+106ffx^5226+22f9x^5225+aeddx^5224+ea50x^5223+2138fx^5222+61c7x^5221+1e8e3x^5220+20c6cx^5219+3e18x^5218+13678x^5217+11056x^5216+51acx^5215+1985cx^5214+79c9x^5213+260edx^5212+1e49dx^5211+1f70ex^5210+25343x^5209+1a04bx^5208+a174x^5207+a743x^5206+c44ex^5205+15585x^5204+1ab97x^5203+d9f0x^5202+1c1afx^5201+14868x^5200+16a06x^5199+2121cx^5198+5a88x^5197+1c4a8x^5196+15745x^5195+1b457x^5194+105b0x^5193+1c6ex^5192+8e26x^5191+46bdx^5190+161b1x^5189+1e873x^5188+20a3cx^5187+3328x^5186+ffc8x^5185+27ee7x^5184+27a7fx^5183+26477x^5182+1f64fx^5181+24f88x^5180+18da4x^5179+4431x^5178+154f5x^5177+1a8c7x^5176+cbe0x^5175+17b5fx^5174+268d9x^5173+20c39x^5172+3d19x^5171+1317dx^5170+f76fx^5169+2552ax^5168+1a9cex^5167+d103x^5166+1950ex^5165+6943x^5164+20e4fx^5163+4787x^5162+165a3x^5161+1fc2dx^5160+26cdex^5159+22052x^5158+a196x^5157+a7edx^5156+c7a0x^5155+1661fx^5154+1fe99x^5153+278fax^5152+25cdex^5151+1d052x^5150+19197x^5149+57f0x^5148+1b7b0x^5147+1166dx^5146+701fx^5145+2309bx^5144+f303x^5143+23f0ex^5142+13b42x^5141+12848x^5140+c966x^5139+16efdx^5138+22aefx^5137+d6a7x^5136+1b142x^5135+f647x^5134+24f62x^5133+18ce6x^5132+407bx^5131+14267x^5130+14c01x^5129+17c03x^5128+26c0dx^5127+21c3dx^5126+8d2dx^5125+41e0x^5124+14960x^5123+16edex^5122+22a54x^5121+d3a0x^5120+1a21fx^5119+aa98x^5118+d4f7x^5117+1a8d2x^5116+cc17x^5115+17c72x^5114+26e38x^5113+22714x^5112+c360x^5111+150dfx^5110+19459x^5109+65bax^5108+1fca2x^5107+26f27x^5106+22bbfx^5105+dab7x^5104+1c592x^5103+15bd7x^5102+1cb31x^5101+177f2x^5100+257b8x^5099+1b694x^5098+110e1x^5097+5463x^5096+1a5efx^5095+bda8x^5094+13447x^5093+10561x^5092+1ae3x^5091+866fx^5090+202ax^5089+a0d2x^5088+a419x^5087+b47cx^5086+1066bx^5085+2015x^5084+a069x^5083+a20cx^5082+aa3bx^5081+d326x^5080+19fbdx^5079+9eaex^5078+9965x^5077+7ef8x^5076+27ad8x^5075+26634x^5074+1ff00x^5073+27afdx^5072+266edx^5071+2029dx^5070+d0dx^5069+4141x^5068+14645x^5067+15f57x^5066+1dcb1x^5065+1cf72x^5064+18d37x^5063+4210x^5062+14a50x^5061+1738ex^5060+241c4x^5059+148d0x^5058+16c0ex^5057+21c44x^5056+8d50x^5055+428fx^5054+14ccbx^5053+17ff5x^5052+27fc7x^5051+27edfx^5050+27a57x^5049+263afx^5048+1f267x^5047+23c00x^5046+12bfcx^5045+dbeax^5044+1cb91x^5043+179d2x^5042+26118x^5041+1e574x^5040+1fb41x^5039+26842x^5038+20946x^5037+2e5ax^5036+e7c2x^5035+206c9x^5034+21e9x^5033+a98dx^5032+cfc0x^5031+18ebfx^5030+49b8x^5029+17098x^5028+232f6x^5027+fecax^5026+279f1x^5025+261b1x^5024+1e871x^5023+20a32x^5022+32f6x^5021+fecex^5020+27a05x^5019+26215x^5018+1ea65x^5017+213f6x^5016+63cax^5015+1f2f2x^5014+23eb7x^5013+1398fx^5012+11fc9x^5011+9eebx^5010+9a96x^5009+84edx^5008+18a0x^5007+7b20x^5006+267a0x^5005+2061cx^5004+1e88x^5003+98a8x^5002+7b47x^5001+26863x^5000+209ebx^4999+3193x^4998+f7dfx^4997+2575ax^4996+1b4bex^4995+107b3x^4994+267dx^4993+c071x^4992+14234x^4991+14b02x^4990+17708x^4989+25326x^4988+19fbax^4987+9e9fx^4986+991ax^4985+7d81x^4984+27385x^4983+24195x^4982+147e5x^4981+16777x^4980+20551x^4979+1a91x^4978+84d5x^4977+1828x^4976+78c8x^4975+25be8x^4974+1cb84x^4973+17991x^4972+25fd3x^4971+1df1bx^4970+1db84x^4969+1c991x^4968+16fd2x^4967+22f18x^4966+eb74x^4965+21943x^4964+7e4bx^4963+27777x^4962+2554fx^4961+1aa87x^4960+d4a0x^4959+1a71fx^4958+c398x^4957+151f7x^4956+199d1x^4955+8112x^4954+559x^4953+1abdx^4952+85b1x^4951+1c74x^4950+8e44x^4949+4753x^4948+1649fx^4947+1f719x^4946+2537ax^4945+1a15ex^4944+a6d3x^4943+c21ex^4942+14a95x^4941+174e7x^4940+24881x^4939+16a81x^4938+21483x^4937+668bx^4936+200b7x^4935+38fx^4934+11cbx^4933+58f7x^4932+1bcd3x^4931+1301cx^4930+f08ax^4929+232b1x^4928+fd71x^4927+27334x^4926+24000x^4925+13ffcx^4924+13feax^4923+13f90x^4922+13dcex^4921+13504x^4920+10912x^4919+2d58x^4918+e2b8x^4917+1ed97x^4916+223f0x^4915+b3acx^4914+1025bx^4913+bc5x^4912+3ad9x^4911+1263dx^4910+bf2fx^4909+13beax^4908+12b90x^4907+d9cex^4906+1c105x^4905+14516x^4904+1596cx^4903+1bf1ax^4902+13b7fx^4901+12979x^4900+cf5bx^4899+18cc6x^4898+3fdbx^4897+13f47x^4896+13c61x^4895+12de3x^4894+e56dx^4893+1fb20x^4892+2679dx^4891+2060dx^4890+1e3dx^4889+9731x^4888+73f4x^4887+243c4x^4886+152d0x^4885+19e0ex^4884+9643x^4883+6f4ex^4882+22c86x^4881+de9ax^4880+1d901x^4879+1bd02x^4878+13107x^4877+f521x^4876+249a4x^4875+17030x^4874+230eex^4873+f4a2x^4872+24729x^4871+163c9x^4870+1f2ebx^4869+23e94x^4868+138e0x^4867+11c5ex^4866+8dd4x^4865+4523x^4864+159afx^4863+1c069x^4862+1420ax^4861+14a30x^4860+172eex^4859+23ea4x^4858+13930x^4857+11deex^4856+95a4x^4855+6c33x^4854+21cffx^4853+90f7x^4852+54d2x^4851+1a81ax^4850+c87fx^4849+16a7ax^4848+21460x^4847+65dcx^4846+1fd4cx^4845+27279x^4844+23c59x^4843+12db9x^4842+e49bx^4841+1f706x^4840+2531bx^4839+19f83x^4838+9d8cx^4837+93bbx^4836+62a6x^4835+1ed3ex^4834+22233x^4833+aafbx^4832+d6e6x^4831+1b27dx^4830+fc6ex^4829+26e25x^4828+226b5x^4827+c185x^4826+14798x^4825+165f6x^4824+1fdccx^4823+274f9x^4822+248d9x^4821+16c39x^4820+21d1bx^4819+9183x^4818+578ex^4817+1b5c6x^4816+10cdbx^4815+4045x^4814+14159x^4813+146bbx^4812+161a5x^4811+1e837x^4810+20910x^4809+2d4cx^4808+e27cx^4807+1ec6bx^4806+21e14x^4805+9660x^4804+6fdfx^4803+22f5bx^4802+ecc3x^4801+21fcex^4800+9f02x^4799+9b09x^4798+872cx^4797+23dbx^4796+b347x^4795+10062x^4794+1e8x^4793+988x^4792+2fa8x^4791+ee48x^4790+22767x^4789+c4ffx^4788+158fax^4787+1bce0x^4786+1305dx^4785+f1cfx^4784+2390ax^4783+11d2ex^4782+91e4x^4781+5973x^4780+1bf3fx^4779+13c38x^4778+12d16x^4777+e16cx^4776+1e71bx^4775+20384x^4774+1190x^4773+57d0x^4772+1b710x^4771+1134dx^4770+607fx^4769+1e27bx^4768+1ec64x^4767+21df1x^4766+95b1x^4765+6c74x^4764+21e44x^4763+9750x^4762+748fx^4761+246cbx^4760+161f3x^4759+1e9bdx^4758+210aex^4757+5362x^4756+1a0eax^4755+a48fx^4754+b6cax^4753+111f1x^4752+59b3x^4751+1c07fx^4750+14278x^4749+14c56x^4748+17dacx^4747+2745ax^4746+245bex^4745+15cb2x^4744+1cf78x^4743+18d55x^4742+42a6x^4741+14d3ex^4740+18234x^4739+b01x^4738+3705x^4737+11319x^4736+5f7bx^4735+1dd67x^4734+1d300x^4733+19efdx^4732+9aeex^4731+86a5x^4730+2138x^4729+a618x^4728+be77x^4727+13852x^4726+11998x^4725+7ff6x^4724+27fcex^4723+27f02x^4722+27b06x^4721+2671ax^4720+2037ex^4719+1172x^4718+573ax^4717+1b422x^4716+104a7x^4715+1741x^4714+7445x^4713+24559x^4712+15ab9x^4711+1c59bx^4710+15c04x^4709+1cc12x^4708+17c57x^4707+26db1x^4706+22471x^4705+b631x^4704+10ef4x^4703+4ac2x^4702+175cax^4701+24cf0x^4700+180acx^4699+359x^4698+10bdx^4697+53b1x^4696+1a275x^4695+ac46x^4694+dd5dx^4693+1d2d0x^4692+19e0dx^4691+963ex^4690+6f35x^4689+22c09x^4688+dc29x^4687+1ccccx^4686+17ff9x^4685+27fdbx^4684+27f43x^4683+27c4bx^4682+26d73x^4681+2233bx^4680+b023x^4679+f0aex^4678+23365x^4677+100f5x^4676+4c7x^4675+17e3x^4674+776fx^4673+2552bx^4672+1a9d3x^4671+d11cx^4670+1958bx^4669+6bb4x^4668+21a84x^4667+8490x^4666+16cfx^4665+720bx^4664+23a37x^4663+1230fx^4662+af49x^4661+ec6cx^4660+21e1bx^4659+9683x^4658+708ex^4657+232c6x^4656+fddax^4655+27541x^4654+24a41x^4653+17341x^4652+24043x^4651+1414bx^4650+14675x^4649+16047x^4648+1e161x^4647+1e6e2x^4646+20267x^4645+bffx^4644+3bfbx^4643+12be7x^4642+db81x^4641+1c984x^4640+16f91x^4639+22dd3x^4638+e51bx^4637+1f986x^4636+25f9bx^4635+1de03x^4634+1d60cx^4633+1ae39x^4632+e71ax^4631+20381x^4630+1181x^4629+5785x^4628+1b599x^4627+10bfax^4626+3be0x^4625+12b60x^4624+d8dex^4623+1bc55x^4622+12da6x^4621+e43cx^4620+1f52bx^4619+249d4x^4618+17120x^4617+2359ex^4616+10c12x^4615+3c58x^4614+12db8x^4613+e496x^4612+1f6edx^4611+2529ex^4610+19d12x^4609+9157x^4608+56b2x^4607+1b17ax^4606+f75fx^4605+254dax^4604+1a83ex^4603+c933x^4602+16dfex^4601+225f4x^4600+bdc0x^4599+134bfx^4598+107b9x^4597+269bx^4596+c107x^4595+14522x^4594+159a8x^4593+1c046x^4592+1415bx^4591+146c5x^4590+161d7x^4589+1e931x^4588+20df2x^4587+45b6x^4586+15c8ex^4585+1cec4x^4584+189d1x^4583+3112x^4582+f55ax^4581+24ac1x^4580+175c1x^4579+24cc3x^4578+17fcbx^4577+27ef5x^4576+27ac5x^4575+265d5x^4574+1fd25x^4573+271b6x^4572+2388ax^4571+11aaex^4570+8564x^4569+1af3x^4568+86bfx^4567+21bax^4566+a8a2x^4565+cb29x^4564+177ccx^4563+256fax^4562+1b2dex^4561+fe53x^4560+2779ex^4559+25612x^4558+1ae56x^4557+e7abx^4556+20656x^4555+1faax^4554+9e52x^4553+9799x^4552+75fcx^4551+24decx^4550+18598x^4549+1bf5x^4548+8bc9x^4547+3aecx^4546+1269cx^4545+c10ax^4544+14531x^4543+159f3x^4542+1c1bdx^4541+148aex^4540+16b64x^4539+218f2x^4538+7cb6x^4537+26f8ex^4536+22dc2x^4535+e4c6x^4534+1f7ddx^4533+2574ex^4532+1b482x^4531+10687x^4530+20a1x^4529+a325x^4528+afb8x^4527+ee97x^4526+228f2x^4525+ccb6x^4524+17f8dx^4523+27dbfx^4522+274b7x^4521+2478fx^4520+165c7x^4519+1fce1x^4518+27062x^4517+231e6x^4516+f97ax^4515+25f61x^4514+1dce1x^4513+1d062x^4512+191e7x^4511+5980x^4510+1bf80x^4509+13d7dx^4508+1336fx^4507+10129x^4506+5cbx^4505+1cf7x^4504+90d3x^4503+541ex^4502+1a496x^4501+b6ebx^4500+11296x^4499+5cecx^4498+1d09cx^4497+19309x^4496+5f2ax^4495+1dbd2x^4494+1cb17x^4493+17770x^4492+2552ex^4491+1a9e2x^4490+d167x^4489+19702x^4488+7307x^4487+23f23x^4486+13babx^4485+12a55x^4484+d3a7x^4483+1a242x^4482+ab47x^4481+d862x^4480+1b9e9x^4479+1218ax^4478+a7b0x^4477+c66fx^4476+1602ax^4475+1e0d0x^4474+1e40dx^4473+1f43ex^4472+24533x^4471+159fbx^4470+1c1e5x^4469+14976x^4468+16f4cx^4467+22c7ax^4466+de5ex^4465+1d7d5x^4464+1b726x^4463+113bbx^4462+62a5x^4461+1ed39x^4460+2221ax^4459+aa7ex^4458+d475x^4457+1a648x^4456+bf65x^4455+13cf8x^4454+130d6x^4453+f42cx^4452+244dbx^4451+15843x^4450+1b94dx^4449+11e7ex^4448+9874x^4447+7a43x^4446+2634fx^4445+1f087x^4444+232a0x^4443+fd1cx^4442+2718bx^4441+237b3x^4440+1167bx^4439+7065x^4438+231f9x^4437+f9d9x^4436+2613cx^4435+1e628x^4434+1fec5x^4433+279d6x^4432+2612ax^4431+1e5cex^4430+1fd03x^4429+2710cx^4428+23538x^4427+10a14x^4426+3262x^4425+fbeax^4424+26b91x^4423+219d1x^4422+8111x^4421+554x^4420+1aa4x^4419+8534x^4418+1a03x^4417+820fx^4416+a4ax^4415+3372x^4414+1013ax^4413+620x^4412+1ea0x^4411+9920x^4410+7d9fx^4409+2741bx^4408+24483x^4407+1568bx^4406+1b0b5x^4405+f386x^4404+2419dx^4403+1480dx^4402+1683fx^4401+20939x^4400+2e19x^4399+e67dx^4398+20070x^4397+22cx^4396+adcx^4395+364cx^4394+10f7cx^4393+4d6ax^4392+18312x^4391+f57x^4390+4cb3x^4389+17f7fx^4388+27d79x^4387+27359x^4386+240b9x^4385+14399x^4384+151fbx^4383+199e5x^4382+8176x^4381+74dx^4380+2481x^4379+b685x^4378+11098x^4377+52f6x^4376+19ecex^4375+9a03x^4374+820ex^4373+a45x^4372+3359x^4371+100bdx^4370+3afx^4369+126bx^4368+5c17x^4367+1cc73x^4366+17e3cx^4365+2772ax^4364+253cex^4363+1a302x^4362+af07x^4361+eb22x^4360+217a9x^4359+7649x^4358+24f6dx^4357+18d1dx^4356+418ex^4355+147c6x^4354+166dcx^4353+2024ax^4352+b6ex^4351+3926x^4350+11dbex^4349+94b4x^4348+6783x^4347+2058fx^4346+1bc7x^4345+8ae3x^4344+366ex^4343+11026x^4342+50bcx^4341+193acx^4340+6259x^4339+1ebbdx^4338+21aaex^4337+8562x^4336+1ae9x^4335+868dx^4334+20c0x^4333+a3c0x^4332+b2bfx^4331+fdbax^4330+274a1x^4329+24721x^4328+163a1x^4327+1f223x^4326+23aacx^4325+12558x^4324+bab6x^4323+1258dx^4322+bbbfx^4321+12abax^4320+d5a0x^4319+1ac1fx^4318+dc98x^4317+1cef7x^4316+18ad0x^4315+360dx^4314+10e41x^4313+4743x^4312+1644fx^4311+1f589x^4310+24baax^4309+17a4ex^4308+26384x^4307+1f190x^4306+237cdx^4305+116fdx^4304+72efx^4303+23eabx^4302+13953x^4301+11e9dx^4300+990fx^4299+7d4ax^4298+27272x^4297+23c36x^4296+12d0ax^4295+e130x^4294+1e5efx^4293+1fda8x^4292+27445x^4291+24555x^4290+15aa5x^4289+1c537x^4288+15a10x^4287+1c24ex^4286+14b83x^4285+1798dx^4284+25fbfx^4283+1deb7x^4282+1d990x^4281+1bfcdx^4280+13efex^4279+13af4x^4278+126c2x^4277+c1c8x^4276+148e7x^4275+16c81x^4274+21e83x^4273+988bx^4272+7ab6x^4271+2658ex^4270+1fbc2x^4269+26ac7x^4268+215dfx^4267+6d57x^4266+222b3x^4265+ad7bx^4264+e366x^4263+1f0fdx^4262+234eex^4261+108a2x^4260+2b28x^4259+d7c8x^4258+1b6e7x^4257+11280x^4256+5c7ex^4255+1ce76x^4254+1884bx^4253+2974x^4252+cf44x^4251+18c53x^4250+3d9cx^4249+1340cx^4248+1043ax^4247+1520x^4246+69a0x^4245+21020x^4244+509cx^4243+1930cx^4242+5f39x^4241+1dc1dx^4240+1cc8ex^4239+17ec3x^4238+279cdx^4237+260fdx^4236+1e4edx^4235+1f89ex^4234+25b13x^4233+1c75bx^4232+164c4x^4231+1f7d2x^4230+25717x^4229+1b36fx^4228+10128x^4227+5c6x^4226+1cdex^4225+9056x^4224+51adx^4223+19861x^4222+79e2x^4221+2616ax^4220+1e70ex^4219+20343x^4218+104bx^4217+5177x^4216+19753x^4215+749cx^4214+2470cx^4213+16338x^4212+1f016x^4211+2306bx^4210+f213x^4209+23a5ex^4208+123d2x^4207+b318x^4206+ff77x^4205+27d52x^4204+27296x^4203+23ceax^4202+1308ex^4201+f2c4x^4200+23dd3x^4199+1351bx^4198+10985x^4197+2f97x^4196+edf3x^4195+225bex^4194+bcb2x^4193+12f79x^4192+ed5bx^4191+222c6x^4190+addax^4189+e541x^4188+1fa44x^4187+26351x^4186+1f091x^4185+232d2x^4184+fe16x^4183+2766dx^4182+2501dx^4181+1908dx^4180+52bex^4179+19db6x^4178+948bx^4177+66b6x^4176+2018ex^4175+7c2x^4174+26cax^4173+c1f2x^4172+149b9x^4171+1709bx^4170+23305x^4169+ff15x^4168+27b68x^4167+26904x^4166+20d10x^4165+414cx^4164+1467cx^4163+1606ax^4162+1e210x^4161+1ea4dx^4160+2137ex^4159+6172x^4158+1e73ax^4157+2041fx^4156+1497x^4155+66f3x^4154+202bfx^4153+db7x^4152+4493x^4151+156dfx^4150+1b259x^4149+fbbax^4148+26aa1x^4147+21521x^4146+69a1x^4145+21025x^4144+50b5x^4143+19389x^4142+61aax^4141+1e852x^4140+20997x^4139+2fefx^4138+efabx^4137+22e56x^4136+e7aax^4135+20651x^4134+1f91x^4133+9dd5x^4132+9528x^4131+69c7x^4130+210e3x^4129+546bx^4128+1a617x^4127+be70x^4126+1382fx^4125+118e9x^4124+7c8bx^4123+26eb7x^4122+2298fx^4121+cfc7x^4120+18ee2x^4119+4a67x^4118+17403x^4117+2440dx^4116+1543dx^4115+1a52fx^4114+b9e8x^4113+12187x^4112+a7a1x^4111+c624x^4110+15eb3x^4109+1d97dx^4108+1bf6ex^4107+13d23x^4106+131adx^4105+f85fx^4104+259dax^4103+1c13ex^4102+14633x^4101+15efdx^4100+1daefx^4099+1c6a8x^4098+16145x^4097+1e657x^4096+1ffb0x^4095+27e6dx^4094+2781dx^4093+2588dx^4092+1babdx^4091+125aex^4090+bc64x^4089+12df3x^4088+e5bdx^4087+1fcb0x^4086+26f6dx^4085+22d1dx^4084+e18dx^4083+1e7c0x^4082+206bdx^4081+21adx^4080+a861x^4079+c9e4x^4078+17173x^4077+2373dx^4076+1142dx^4075+64dfx^4074+1f85bx^4073+259c4x^4072+1c0d0x^4071+1440dx^4070+1543fx^4069+1a539x^4068+ba1ax^4067+12281x^4066+ac83x^4065+de8ex^4064+1d8c5x^4063+1bbd6x^4062+12b2bx^4061+d7d5x^4060+1b728x^4059+113c5x^4058+62d7x^4057+1ee33x^4056+226fcx^4055+c2e8x^4054+14e87x^4053+188a1x^4052+2b22x^4051+d7aax^4050+1b651x^4049+10f92x^4048+4dd8x^4047+18538x^4046+1a15x^4045+8269x^4044+c0cx^4043+3c3cx^4042+12d2cx^4041+e1dax^4040+1e941x^4039+20e42x^4038+4746x^4037+1645ex^4036+1f5d4x^4035+24d21x^4034+181a1x^4033+822x^4032+28aax^4031+cb52x^4030+17899x^4029+25afbx^4028+1c6e3x^4027+1626cx^4026+1ec1ax^4025+21c7fx^4024+8e77x^4023+4852x^4022+1699ax^4021+21000x^4020+4ffcx^4019+18fecx^4018+4f99x^4017+18dfdx^4016+45eex^4015+15da6x^4014+1d43cx^4013+1a529x^4012+b9cax^4011+120f1x^4010+a4b3x^4009+b77ex^4008+11575x^4007+6b47x^4006+21863x^4005+79ebx^4004+26197x^4003+1e7efx^4002+207a8x^4001+2644x^4000+bf54x^3999+13ca3x^3998+12f2dx^3997+ebdfx^3996+21b5ax^3995+88bex^3994+2bb5x^3993+da89x^3992+1c4acx^3991+15759x^3990+1b4bbx^3989+107a4x^3988+2632x^3987+befax^3986+13ae1x^3985+12663x^3984+bfedx^3983+13fa0x^3982+13e1ex^3981+13694x^3980+110e2x^3979+5468x^3978+1a608x^3977+be25x^3976+136b8x^3975+11196x^3974+57ecx^3973+1b79cx^3972+11609x^3971+6e2bx^3970+226d7x^3969+c22fx^3968+14aeax^3967+17690x^3966+250cex^3965+19402x^3964+6407x^3963+1f423x^3962+244acx^3961+15758x^3960+1b4b6x^3959+1078bx^3958+25b5x^3957+bc89x^3956+12eacx^3955+e95ax^3954+20ec1x^3953+49c1x^3952+170c5x^3951+233d7x^3950+1032fx^3949+fe9x^3948+4f8dx^3947+18dc1x^3946+44c2x^3945+157cax^3944+1b6f0x^3943+112adx^3942+5d5fx^3941+1d2dbx^3940+19e44x^3939+9751x^3938+7494x^3937+246e4x^3936+16270x^3935+1ec2ex^3934+21ce3x^3933+906bx^3932+5216x^3931+19a6ex^3930+8423x^3929+14aex^3928+6766x^3927+204fex^3926+18f2x^3925+7cbax^3924+26fa2x^3923+22e26x^3922+e6bax^3921+201a1x^3920+821x^3919+28a5x^3918+cb39x^3917+1781cx^3916+2588ax^3915+1baaex^3914+12563x^3913+baedx^3912+126a0x^3911+c11ex^3910+14595x^3909+15be7x^3908+1cb81x^3907+17982x^3906+25f88x^3905+1dda4x^3904+1d431x^3903+1a4f2x^3902+b8b7x^3901+11b92x^3900+89d8x^3899+3137x^3898+f613x^3897+24e5ex^3896+187d2x^3895+2717x^3894+c373x^3893+1513ex^3892+19634x^3891+6f01x^3890+22b05x^3889+d715x^3888+1b368x^3887+10105x^3886+517x^3885+1973x^3884+7f3fx^3883+27c3bx^3882+26d23x^3881+221abx^3880+a853x^3879+c99ex^3878+17015x^3877+23067x^3876+f1ffx^3875+239fax^3874+121dex^3873+a954x^3872+cea3x^3871+1892ex^3870+2de3x^3869+e56fx^3868+1fb2ax^3867+267cfx^3866+20707x^3865+231fx^3864+af9bx^3863+ee06x^3862+2261dx^3861+be8dx^3860+138c0x^3859+11bbex^3858+8ab4x^3857+3583x^3856+10b8fx^3855+39c9x^3854+120edx^3853+a49fx^3852+b71ax^3851+11381x^3850+6183x^3849+1e78fx^3848+205c8x^3847+1ce4x^3846+9074x^3845+5243x^3844+19b4fx^3843+8888x^3842+2aa7x^3841+d543x^3840+1aa4ex^3839+d383x^3838+1a18ex^3837+a7c3x^3836+c6cex^3835+16205x^3834+1ea17x^3833+21270x^3832+5c2cx^3831+1ccdcx^3830+18049x^3829+16ax^3828+712x^3827+235ax^3826+b0c2x^3825+f3c9x^3824+242ecx^3823+14e98x^3822+188f6x^3821+2ccbx^3820+dff7x^3819+1dfd2x^3818+1df17x^3817+1db70x^3816+1c92dx^3815+16ddex^3814+22554x^3813+baa0x^3812+1251fx^3811+b999x^3810+11ffcx^3809+9feax^3808+9f91x^3807+9dd4x^3806+9523x^3805+69aex^3804+21066x^3803+51fax^3802+199e2x^3801+8167x^3800+702x^3799+230ax^3798+af32x^3797+ebf9x^3796+21bdcx^3795+8b48x^3794+3867x^3793+11a03x^3792+820dx^3791+a40x^3790+3340x^3789+10040x^3788+13ex^3787+636x^3786+1f0ex^3785+9b46x^3784+885dx^3783+29d0x^3782+d110x^3781+1954fx^3780+6a88x^3779+214a8x^3778+6744x^3777+20454x^3776+15a0x^3775+6c20x^3774+21ca0x^3773+8f1cx^3772+4b8bx^3771+179b7x^3770+26091x^3769+1e2d1x^3768+1ee12x^3767+22657x^3766+bfafx^3765+13e6ax^3764+13810x^3763+1184ex^3762+7984x^3761+25f94x^3760+1dde0x^3759+1d55dx^3758+1aacex^3757+d603x^3756+1ae0ex^3755+e643x^3754+1ff4ex^3753+27c83x^3752+26e8bx^3751+228b3x^3750+cb7bx^3749+17966x^3748+25efcx^3747+1dae8x^3746+1c685x^3745+16096x^3744+1e2ecx^3743+1ee99x^3742+228fax^3741+ccdex^3740+18055x^3739+1a6x^3738+83ex^3737+2936x^3736+ce0ex^3735+18645x^3734+1f56x^3733+9caex^3732+8f65x^3731+4cf8x^3730+180d8x^3729+435x^3728+1509x^3727+692dx^3726+20de1x^3725+4561x^3724+15ae5x^3723+1c677x^3722+16050x^3721+1e18ex^3720+1e7c3x^3719+206ccx^3718+21f8x^3717+a9d8x^3716+d137x^3715+19612x^3714+6e57x^3713+227b3x^3712+c67bx^3711+16066x^3710+1e1fcx^3709+1e9e9x^3708+2118ax^3707+57aex^3706+1b666x^3705+10ffbx^3704+4fe5x^3703+18f79x^3702+4d5ax^3701+182c2x^3700+dc7x^3699+44e3x^3698+1586fx^3697+1ba29x^3696+122cax^3695+adf0x^3694+e5afx^3693+1fc6ax^3692+26e0fx^3691+22647x^3690+bf5fx^3689+13cdax^3688+13040x^3687+f13ex^3686+23635x^3685+10f05x^3684+4b17x^3683+17773x^3682+2553dx^3681+1aa2dx^3680+d2dex^3679+19e55x^3678+97a6x^3677+763dx^3676+24f31x^3675+18bf1x^3674+3bb2x^3673+12a7ax^3672+d460x^3671+1a5dfx^3670+bd58x^3669+132b7x^3668+fd91x^3667+273d4x^3666+24320x^3665+14f9cx^3664+18e0ax^3663+462fx^3662+15eebx^3661+1da95x^3660+1c4e6x^3659+1587bx^3658+1ba65x^3657+123f6x^3656+b3ccx^3655+102fbx^3654+ee5x^3653+4a79x^3652+1745dx^3651+245cfx^3650+15d07x^3649+1d121x^3648+195a2x^3647+6c27x^3646+21cc3x^3645+8fcbx^3644+4ef6x^3643+18acex^3642+3603x^3641+10e0fx^3640+4649x^3639+15f6dx^3638+1dd1fx^3637+1d198x^3636+197f5x^3635+77c6x^3634+256dex^3633+1b252x^3632+fb97x^3631+269f2x^3630+211b6x^3629+588ax^3628+1bab2x^3627+12577x^3626+bb51x^3625+12894x^3624+cae2x^3623+17669x^3622+2500bx^3621+19033x^3620+50fcx^3619+194ecx^3618+6899x^3617+20afdx^3616+36edx^3615+112a1x^3614+5d23x^3613+1d1afx^3612+19868x^3611+7a05x^3610+26219x^3609+1ea79x^3608+2145ax^3607+65bex^3606+1fcb6x^3605+26f8bx^3604+22db3x^3603+e47bx^3602+1f666x^3601+24ffbx^3600+18fe3x^3599+4f6cx^3598+18d1cx^3597+4189x^3596+147adx^3595+1665fx^3594+1ffd9x^3593+27f3ax^3592+27c1ex^3591+26c92x^3590+21ed6x^3589+9a2ax^3588+82d1x^3587+e14x^3586+4664x^3585+15ff4x^3584+1dfc2x^3583+1dec7x^3582+1d9e0x^3581+1c15dx^3580+146cex^3579+16204x^3578+1ea12x^3577+21257x^3576+5bafx^3575+1ca6bx^3574+17414x^3573+24462x^3572+155e6x^3571+1ad7cx^3570+e369x^3569+1f10cx^3568+23539x^3567+10a19x^3566+327bx^3565+fc67x^3564+26e02x^3563+22606x^3562+be1ax^3561+13681x^3560+11083x^3559+528dx^3558+19cc1x^3557+8fc2x^3556+4ec9x^3555+189edx^3554+319ex^3553+f816x^3552+2586dx^3551+1ba1dx^3550+1228ex^3549+acc4x^3548+dfd3x^3547+1df1ex^3546+1db93x^3545+1c9dcx^3544+17149x^3543+2366bx^3542+11013x^3541+505dx^3540+191d1x^3539+5912x^3538+1bd5ax^3537+132bfx^3536+fdb9x^3535+2749cx^3534+24708x^3533+16324x^3532+1efb2x^3531+22e77x^3530+e84fx^3529+2098ax^3528+2faex^3527+ee66x^3526+227fdx^3525+c7edx^3524+167a0x^3523+2061ex^3522+1e92x^3521+98dax^3520+7c41x^3519+26d45x^3518+22255x^3517+aba5x^3516+da38x^3515+1c317x^3514+14f70x^3513+18d2ex^3512+41e3x^3511+1496fx^3510+16f29x^3509+22bcbx^3508+daf3x^3507+1c6bex^3506+161b3x^3505+1e87dx^3504+20a6ex^3503+3422x^3502+104aax^3501+1750x^3500+7490x^3499+246d0x^3498+1620cx^3497+1ea3ax^3496+2131fx^3495+5f97x^3494+1ddf3x^3493+1d5bcx^3492+1aca9x^3491+df4ax^3490+1dc71x^3489+1ce32x^3488+186f7x^3487+22d0x^3486+ae10x^3485+e64fx^3484+1ff8ax^3483+27dafx^3482+27467x^3481+245ffx^3480+15df7x^3479+1d5d1x^3478+1ad12x^3477+e157x^3476+1e6b2x^3475+20177x^3474+74fx^3473+248bx^3472+b6b7x^3471+11192x^3470+57d8x^3469+1b738x^3468+11415x^3467+6467x^3466+1f603x^3465+24e0cx^3464+18638x^3463+1f15x^3462+9b69x^3461+890cx^3460+2d3bx^3459+e227x^3458+1eac2x^3457+215c7x^3456+6cdfx^3455+2205bx^3454+a1c3x^3453+a8cex^3452+cc05x^3451+17c18x^3450+26c76x^3449+21e4ax^3448+976ex^3447+7525x^3446+249b9x^3445+17099x^3444+232fbx^3443+fee3x^3442+27a6ex^3441+26422x^3440+1f4a6x^3439+2473bx^3438+16423x^3437+1f4adx^3436+2475ex^3435+164d2x^3434+1f818x^3433+25875x^3432+1ba45x^3431+12356x^3430+b0acx^3429+f35bx^3428+240c6x^3427+143dax^3426+15340x^3425+1a03ex^3424+a133x^3423+a5fex^3422+bdf5x^3421+135c8x^3420+10ce6x^3419+407cx^3418+1426cx^3417+14c1ax^3416+17c80x^3415+26e7ex^3414+22872x^3413+ca36x^3412+1730dx^3411+23f3fx^3410+13c37x^3409+12d11x^3408+e153x^3407+1e69ex^3406+20113x^3405+55bx^3404+1ac7x^3403+85e3x^3402+1d6ex^3401+9326x^3400+5fbdx^3399+1deb1x^3398+1d972x^3397+1bf37x^3396+13c10x^3395+12c4ex^3394+dd84x^3393+1d393x^3392+1a1dcx^3391+a949x^3390+ce6cx^3389+1881bx^3388+2884x^3387+ca94x^3386+174e3x^3385+2486dx^3384+16a1dx^3383+2128fx^3382+5cc7x^3381+1cfe3x^3380+18f6cx^3379+4d19x^3378+1817dx^3377+76ex^3376+2526x^3375+b9bex^3374+120b5x^3373+a387x^3372+b1a2x^3371+f829x^3370+258ccx^3369+1bbf8x^3368+12bd5x^3367+db27x^3366+1c7c2x^3365+166c7x^3364+201e1x^3363+961x^3362+2ee5x^3361+ea79x^3360+2145cx^3359+65c8x^3358+1fce8x^3357+27085x^3356+23295x^3355+fce5x^3354+27078x^3353+23254x^3352+fba0x^3351+26a1fx^3350+21297x^3349+5cefx^3348+1d0abx^3347+19354x^3346+60a1x^3345+1e325x^3344+1efb6x^3343+22e8bx^3342+e8b3x^3341+20b7ex^3340+3972x^3339+11f3ax^3338+9c20x^3337+8c9fx^3336+3f1ax^3335+13b82x^3334+12988x^3333+cfa6x^3332+18e3dx^3331+472ex^3330+163e6x^3329+1f37cx^3328+24169x^3327+14709x^3326+1632bx^3325+1efd5x^3324+22f26x^3323+ebbax^3322+21aa1x^3321+8521x^3320+19a4x^3319+8034x^3318+103x^3317+50fx^3316+194bx^3315+7e77x^3314+27853x^3313+2599bx^3312+1c003x^3311+1400cx^3310+1403ax^3309+14120x^3308+1459ex^3307+15c14x^3306+1cc62x^3305+17de7x^3304+27581x^3303+24b81x^3302+17981x^3301+25f83x^3300+1dd8bx^3299+1d3b4x^3298+1a281x^3297+ac82x^3296+de89x^3295+1d8acx^3294+1bb59x^3293+128bax^3292+cba0x^3291+17a1fx^3290+26299x^3289+1ecf9x^3288+220dax^3287+a43ex^3286+b535x^3285+10a08x^3284+3226x^3283+fabex^3282+265b5x^3281+1fc85x^3280+26e96x^3279+228eax^3278+cc8ex^3277+17ec5x^3276+279d7x^3275+2612fx^3274+1e5e7x^3273+1fd80x^3272+2737dx^3271+2416dx^3270+1471dx^3269+1638fx^3268+1f1c9x^3267+238eax^3266+11c8ex^3265+8ec4x^3264+49d3x^3263+1711fx^3262+23599x^3261+10bf9x^3260+3bdbx^3259+12b47x^3258+d861x^3257+1b9e4x^3256+12171x^3255+a733x^3254+c3fex^3253+153f5x^3252+1a3c7x^3251+b2e0x^3250+fe5fx^3249+277dax^3248+2573ex^3247+1b432x^3246+104f7x^3245+18d1x^3244+7c15x^3243+26c69x^3242+21e09x^3241+9629x^3240+6eccx^3239+229fcx^3238+d1e8x^3237+19987x^3236+7fa0x^3235+27e20x^3234+2769cx^3233+25108x^3232+19524x^3231+69b1x^3230+21075x^3229+5245x^3228+19b59x^3227+88bax^3226+2ba1x^3225+da25x^3224+1c2b8x^3223+14d95x^3222+183e7x^3221+1380x^3220+6180x^3219+1e780x^3218+2057dx^3217+1b6dx^3216+8921x^3215+2da4x^3214+e434x^3213+1f503x^3212+2490cx^3211+16d38x^3210+22216x^3209+aa6ax^3208+d411x^3207+1a454x^3206+b5a1x^3205+10c24x^3204+3cb2x^3203+12f7ax^3202+ed60x^3201+222dfx^3200+ae57x^3199+e7b2x^3198+20679x^3197+2059x^3196+a1bdx^3195+a8b0x^3194+cb6fx^3193+1792ax^3192+25dd0x^3191+1d50cx^3190+1a939x^3189+ce1ax^3188+18681x^3187+2082x^3186+a28ax^3185+acb1x^3184+df74x^3183+1dd43x^3182+1d24cx^3181+19b79x^3180+895ax^3179+2ec1x^3178+e9c5x^3177+210d8x^3176+5434x^3175+1a504x^3174+b911x^3173+11d54x^3172+92a2x^3171+5d29x^3170+1d1cdx^3169+198fex^3168+7cf3x^3167+270bfx^3166+233b7x^3165+1028fx^3164+cc9x^3163+3fedx^3162+13fa1x^3161+13e23x^3160+136adx^3159+1115fx^3158+56d9x^3157+1b23dx^3156+fb2ex^3155+267e5x^3154+20775x^3153+2545x^3152+ba59x^3151+123bcx^3150+b2aax^3149+fd51x^3148+27294x^3147+23ce0x^3146+1305cx^3145+f1cax^3144+238f1x^3143+11cb1x^3142+8f73x^3141+4d3ex^3140+18236x^3139+b0bx^3138+3737x^3137+11413x^3136+645dx^3135+1f5d1x^3134+24d12x^3133+18156x^3132+6abx^3131+2157x^3130+a6b3x^3129+c17ex^3128+14775x^3127+16547x^3126+1fa61x^3125+263e2x^3124+1f366x^3123+240fbx^3122+144e3x^3121+1586dx^3120+1ba1fx^3119+12298x^3118+acf6x^3117+e0cdx^3116+1e400x^3115+1f3fdx^3114+243eex^3113+153a2x^3112+1a228x^3111+aac5x^3110+d5d8x^3109+1ad37x^3108+e210x^3107+1ea4fx^3106+21388x^3105+61a4x^3104+1e834x^3103+20901x^3102+2d01x^3101+e105x^3100+1e518x^3099+1f975x^3098+25f46x^3097+1dc5ax^3096+1cdbfx^3095+184b8x^3094+1795x^3093+75e9x^3092+24d8dx^3091+183bdx^3090+12aex^3089+5d66x^3088+1d2fex^3087+19ef3x^3086+9abcx^3085+85abx^3084+1c56x^3083+8daex^3082+4465x^3081+155f9x^3080+1addbx^3079+e544x^3078+1fa53x^3077+2639cx^3076+1f208x^3075+23a25x^3074+122b5x^3073+ad87x^3072+e3a2x^3071+1f229x^3070+23acax^3069+125eex^3068+bda4x^3067+13433x^3066+104fdx^3065+18efx^3064+7cabx^3063+26f57x^3062+22cafx^3061+df67x^3060+1dd02x^3059+1d107x^3058+19520x^3057+699dx^3056+21011x^3055+5051x^3054+19195x^3053+57e6x^3052+1b77ex^3051+11573x^3050+6b3dx^3049+21831x^3048+78f1x^3047+25cb5x^3046+1cf85x^3045+18d96x^3044+43ebx^3043+15397x^3042+1a1f1x^3041+a9b2x^3040+d079x^3039+1925cx^3038+5bc9x^3037+1caedx^3036+1769ex^3035+25114x^3034+19560x^3033+6addx^3032+21651x^3031+6f91x^3030+22dd5x^3029+e525x^3028+1f9b8x^3027+26095x^3026+1e2e5x^3025+1ee76x^3024+2284bx^3023+c973x^3022+16f3ex^3021+22c34x^3020+dd00x^3019+1d0ffx^3018+194f8x^3017+68d5x^3016+20c29x^3015+3cc9x^3014+12fedx^3013+ef9fx^3012+22e1ax^3011+e67ex^3010+20075x^3009+245x^3008+b59x^3007+38bdx^3006+11bb1x^3005+8a73x^3004+343ex^3003+10536x^3002+1a0cx^3001+823cx^3000+b2bx^2999+37d7x^2998+11733x^2997+73fdx^2996+243f1x^2995+153b1x^2994+1a273x^2993+ac3cx^2992+dd2bx^2991+1d1d6x^2990+1992bx^2989+7dd4x^2988+27524x^2987+249b0x^2986+1706cx^2985+2321ax^2984+fa7ex^2983+26475x^2982+1f645x^2981+24f56x^2980+18caax^2979+3f4fx^2978+13c8bx^2977+12eb5x^2976+e987x^2975+20fa2x^2974+4e26x^2973+186bex^2972+21b3x^2971+a87fx^2970+ca7ax^2969+17461x^2968+245e3x^2967+15d6bx^2966+1d315x^2965+19f66x^2964+9cfbx^2963+90e6x^2962+547dx^2961+1a671x^2960+c032x^2959+140f9x^2958+144dbx^2957+15845x^2956+1b957x^2955+11eb0x^2954+996ex^2953+7f25x^2952+27bb9x^2951+26a99x^2950+214f9x^2949+68d9x^2948+20c3dx^2947+3d2dx^2946+131e1x^2945+f963x^2944+25eeex^2943+1daa2x^2942+1c527x^2941+159c0x^2940+1c0bex^2939+143b3x^2938+1527dx^2937+19c6fx^2936+8e28x^2935+46c7x^2934+161e3x^2933+1e96dx^2932+20f1ex^2931+4b92x^2930+179dax^2929+26140x^2928+1e63cx^2927+1ff29x^2926+27bcax^2925+26aeex^2924+216a2x^2923+7126x^2922+235bex^2921+10cb2x^2920+3f78x^2919+13d58x^2918+132b6x^2917+fd8cx^2916+273bbx^2915+242a3x^2914+14d2bx^2913+181d5x^2912+926x^2911+2dbex^2910+e4b6x^2909+1f78dx^2908+255bex^2907+1acb2x^2906+df77x^2905+1dd52x^2904+1d297x^2903+19cf0x^2902+90adx^2901+5360x^2900+1a0e0x^2899+a45dx^2898+b5d0x^2897+10d0fx^2896+4149x^2895+1466dx^2894+1601fx^2893+1e099x^2892+1e2fax^2891+1eedfx^2890+22a58x^2889+d3b4x^2888+1a283x^2887+ac8cx^2886+debbx^2885+1d9a6x^2884+1c03bx^2883+14124x^2882+145b2x^2881+15c78x^2880+1ce56x^2879+187abx^2878+2654x^2877+bfa4x^2876+13e33x^2875+136fdx^2874+112efx^2873+5ea9x^2872+1d94dx^2871+1be7ex^2870+13873x^2869+11a3dx^2868+832fx^2867+feax^2866+4f92x^2865+18ddax^2864+453fx^2863+15a3bx^2862+1c325x^2861+14fb6x^2860+18e8cx^2859+48b9x^2858+16b9dx^2857+21a0fx^2856+8247x^2855+b62x^2854+38eax^2853+11c92x^2852+8ed8x^2851+4a37x^2850+17313x^2849+23f5dx^2848+13ccdx^2847+12fffx^2846+eff9x^2845+22fdcx^2844+ef48x^2843+22c67x^2842+ddffx^2841+1d5fax^2840+1addfx^2839+e558x^2838+1fab7x^2837+26590x^2836+1fbccx^2835+26af9x^2834+216d9x^2833+7239x^2832+23b1dx^2831+1278dx^2830+c5bfx^2829+15cbax^2828+1cfa0x^2827+18e1dx^2826+468ex^2825+160c6x^2824+1e3dcx^2823+1f349x^2822+2406ax^2821+1420ex^2820+14a44x^2819+17352x^2818+24098x^2817+142f4x^2816+14ec2x^2815+189c8x^2814+30e5x^2813+f479x^2812+2465cx^2811+15fc8x^2810+1dee6x^2809+1da7bx^2808+1c464x^2807+155f1x^2806+1adb3x^2805+e47cx^2804+1f66bx^2803+25014x^2802+19060x^2801+51ddx^2800+19951x^2799+7e92x^2798+278dax^2797+25c3ex^2796+1cd32x^2795+181f7x^2794+9d0x^2793+3110x^2792+f550x^2791+24a8fx^2790+174c7x^2789+247e1x^2788+16761x^2787+204e3x^2786+186bx^2785+7a17x^2784+26273x^2783+1ec3bx^2782+21d24x^2781+91b0x^2780+586fx^2779+1ba2bx^2778+122d4x^2777+ae22x^2776+e6a9x^2775+2014cx^2774+678x^2773+2058x^2772+a1b8x^2771+a897x^2770+caf2x^2769+176b9x^2768+2519bx^2767+19803x^2766+780cx^2765+2583cx^2764+1b928x^2763+11dc5x^2762+94d7x^2761+6832x^2760+208fax^2759+2cdex^2758+e056x^2757+1e1adx^2756+1e85ex^2755+209d3x^2754+311bx^2753+f587x^2752+24ba2x^2751+17a26x^2750+262bcx^2749+1eda8x^2748+22445x^2747+b555x^2746+10aa8x^2745+3546x^2744+10a5ex^2743+33d4x^2742+10324x^2741+fb2x^2740+4e7ax^2739+18862x^2738+29e7x^2737+d183x^2736+1978ex^2735+75c3x^2734+24ccfx^2733+18007x^2732+20x^2731+a0x^2730+320x^2729+fa0x^2728+4e20x^2727+186a0x^2726+211dx^2725+a591x^2724+bbd4x^2723+12b23x^2722+d7adx^2721+1b660x^2720+10fddx^2719+4f4fx^2718+18c8bx^2717+3eb4x^2716+13984x^2715+11f92x^2714+9dd8x^2713+9537x^2712+6a12x^2711+2125ax^2710+5bbex^2709+1cab6x^2708+1758bx^2707+24bb5x^2706+17a85x^2705+26497x^2704+1f6efx^2703+252a8x^2702+19d44x^2701+9251x^2700+5b94x^2699+1c9e4x^2698+17171x^2697+23733x^2696+113fbx^2695+63e5x^2694+1f379x^2693+2415ax^2692+146bex^2691+161b4x^2690+1e882x^2689+20a87x^2688+349fx^2687+1071bx^2686+2385x^2685+b199x^2684+f7fcx^2683+257ebx^2682+1b793x^2681+115dcx^2680+6d4ax^2679+22272x^2678+ac36x^2677+dd0dx^2676+1d140x^2675+1963dx^2674+6f2ex^2673+22be6x^2672+db7ax^2671+1c961x^2670+16ee2x^2669+22a68x^2668+d404x^2667+1a413x^2666+b45cx^2665+105cbx^2664+1cf5x^2663+90c9x^2662+53ecx^2661+1a39cx^2660+b209x^2659+fa2cx^2658+262dbx^2657+1ee43x^2656+2274cx^2655+c478x^2654+15657x^2653+1afb1x^2652+ee72x^2651+22839x^2650+c919x^2649+16d7cx^2648+2236ax^2647+b10ex^2646+f545x^2645+24a58x^2644+173b4x^2643+24282x^2642+14c86x^2641+17e9cx^2640+2790ax^2639+25d2ex^2638+1d1e2x^2637+19967x^2636+7f00x^2635+27b00x^2634+266fcx^2633+202e8x^2632+e84x^2631+4894x^2630+16ae4x^2629+21672x^2628+7036x^2627+2310ex^2626+f542x^2625+24a49x^2624+17369x^2623+2410bx^2622+14533x^2621+159fdx^2620+1c1efx^2619+149a8x^2618+17046x^2617+2315cx^2616+f6c8x^2615+251e7x^2614+1997fx^2613+7f78x^2612+27d58x^2611+272b4x^2610+23d80x^2609+1337cx^2608+1016ax^2607+710x^2606+2350x^2605+b090x^2604+f2cfx^2603+23e0ax^2602+1362ex^2601+10ee4x^2600+4a72x^2599+1743ax^2598+24520x^2597+1599cx^2596+1c00ax^2595+1402fx^2594+140e9x^2593+1448bx^2592+156b5x^2591+1b187x^2590+f7a0x^2589+2561fx^2588+1ae97x^2587+e8f0x^2586+20cafx^2585+3f67x^2584+13d03x^2583+1310dx^2582+f53fx^2581+24a3ax^2580+1731ex^2579+23f94x^2578+13de0x^2577+1355ex^2576+10ad4x^2575+3622x^2574+10eaax^2573+4950x^2572+16e90x^2571+228cex^2570+cc02x^2569+17c09x^2568+26c2bx^2567+21cd3x^2566+901bx^2565+5086x^2564+1929ex^2563+5d13x^2562+1d15fx^2561+196d8x^2560+7235x^2559+23b09x^2558+12729x^2557+c3cbx^2556+152f6x^2555+19eccx^2554+99f9x^2553+81dcx^2552+94bx^2551+2e77x^2550+e853x^2549+2099ex^2548+3012x^2547+f05ax^2546+231c1x^2545+f8c1x^2544+25bc4x^2543+1cad0x^2542+1760dx^2541+24e3fx^2540+18737x^2539+2410x^2538+b450x^2537+1058fx^2536+1bc9x^2535+8aedx^2534+36a0x^2533+11120x^2532+559ex^2531+1ac16x^2530+dc6bx^2529+1ce16x^2528+1866bx^2527+2014x^2526+a064x^2525+a1f3x^2524+a9bex^2523+d0b5x^2522+19388x^2521+61a5x^2520+1e839x^2519+2091ax^2518+2d7ex^2517+e376x^2516+1f14dx^2515+2367ex^2514+11072x^2513+5238x^2512+19b18x^2511+8775x^2510+2548x^2509+ba68x^2508+12407x^2507+b421x^2506+104a4x^2505+1732x^2504+73fax^2503+243e2x^2502+15366x^2501+1a0fcx^2500+a4e9x^2499+b88cx^2498+11abbx^2497+85a5x^2496+1c38x^2495+8d18x^2494+4177x^2493+14753x^2492+1649dx^2491+1f70fx^2490+25348x^2489+1a064x^2488+a1f1x^2487+a9b4x^2486+d083x^2485+1928ex^2484+5cc3x^2483+1cfcfx^2482+18f08x^2481+4b25x^2480+177b9x^2479+2569bx^2478+1b103x^2477+f50cx^2476+2493bx^2475+16e23x^2474+226adx^2473+c15dx^2472+146d0x^2471+1620ex^2470+1ea44x^2469+21351x^2468+6091x^2467+1e2d5x^2466+1ee26x^2465+226bbx^2464+c1a3x^2463+1482ex^2462+168e4x^2461+20c72x^2460+3e36x^2459+1370ex^2458+11344x^2457+6052x^2456+1e19ax^2455+1e7ffx^2454+207f8x^2453+27d4x^2452+c724x^2451+163b3x^2450+1f27dx^2449+23c6ex^2448+12e22x^2447+e6a8x^2446+20147x^2445+65fx^2444+1fdbx^2443+9f47x^2442+9c62x^2441+8de9x^2440+458cx^2439+15bbcx^2438+1caaax^2437+1754fx^2436+24a89x^2435+174a9x^2434+2474bx^2433+16473x^2432+1f63dx^2431+24f2ex^2430+18be2x^2429+3b67x^2428+12903x^2427+cd0dx^2426+18140x^2425+63dx^2424+1f31x^2423+9bf5x^2422+8bc8x^2421+3ae7x^2420+12683x^2419+c08dx^2418+142c0x^2417+14dbex^2416+184b4x^2415+1781x^2414+7585x^2413+24b99x^2412+179f9x^2411+261dbx^2410+1e943x^2409+20e4cx^2408+4778x^2407+16558x^2406+1fab6x^2405+2658bx^2404+1fbb3x^2403+26a7cx^2402+21468x^2401+6604x^2400+1fe14x^2399+27661x^2398+24fe1x^2397+18f61x^2396+4ce2x^2395+1806ax^2394+20fx^2393+a4bx^2392+3377x^2391+10153x^2390+69dx^2389+2111x^2388+a555x^2387+baa8x^2386+12547x^2385+ba61x^2384+123e4x^2383+b372x^2382+10139x^2381+61bx^2380+1e87x^2379+98a3x^2378+7b2ex^2377+267e6x^2376+2077ax^2375+255ex^2374+bad6x^2373+1262dx^2372+bedfx^2371+13a5ax^2370+123c0x^2369+b2bex^2368+fdb5x^2367+27488x^2366+246a4x^2365+16130x^2364+1e5eex^2363+1fda3x^2362+2742cx^2361+244d8x^2360+15834x^2359+1b902x^2358+11d07x^2357+9121x^2356+55a4x^2355+1ac34x^2354+dd01x^2353+1d104x^2352+19511x^2351+6952x^2350+20e9ax^2349+48fex^2348+16cf6x^2347+220ccx^2346+a3f8x^2345+b3d7x^2344+10332x^2343+ff8x^2342+4fd8x^2341+18f38x^2340+4c15x^2339+17c69x^2338+26e0bx^2337+22633x^2336+befbx^2335+13ae6x^2334+1267cx^2333+c06ax^2332+14211x^2331+14a53x^2330+1739dx^2329+2420fx^2328+14a47x^2327+17361x^2326+240e3x^2325+1446bx^2324+15615x^2323+1ae67x^2322+e800x^2321+207ffx^2320+27f7x^2319+c7d3x^2318+1671ex^2317+20394x^2316+11e0x^2315+5960x^2314+1bee0x^2313+13a5dx^2312+123cfx^2311+b309x^2310+ff2cx^2309+27bdbx^2308+26b43x^2307+2184bx^2306+7973x^2305+25f3fx^2304+1dc37x^2303+1cd10x^2302+1814dx^2301+67ex^2300+2076x^2299+a24ex^2298+ab85x^2297+d998x^2296+1bff7x^2295+13fd0x^2294+13f0ex^2293+13b44x^2292+12852x^2291+c998x^2290+16ff7x^2289+22fd1x^2288+ef11x^2287+22b54x^2286+d8a0x^2285+1bb1fx^2284+12798x^2283+c5f6x^2282+15dcdx^2281+1d4ffx^2280+1a8f8x^2279+ccd5x^2278+18028x^2277+c5x^2276+3d9x^2275+133dx^2274+6031x^2273+1e0f5x^2272+1e4c6x^2271+1f7dbx^2270+25744x^2269+1b450x^2268+1058dx^2267+1bbfx^2266+8abbx^2265+35a6x^2264+10c3ex^2263+3d34x^2262+13204x^2261+fa12x^2260+26259x^2259+1ebb9x^2258+21a9ax^2257+84fex^2256+18f5x^2255+7cc9x^2254+26fedx^2253+22f9dx^2252+ee0dx^2251+22640x^2250+bf3cx^2249+13c2bx^2248+12cd5x^2247+e027x^2246+1e0c2x^2245+1e3c7x^2244+1f2e0x^2243+23e5dx^2242+137cdx^2241+116ffx^2240+72f9x^2239+23eddx^2238+13a4dx^2237+1237fx^2236+b179x^2235+f75cx^2234+254cbx^2233+1a7f3x^2232+c7bcx^2231+166abx^2230+20155x^2229+6a5x^2228+2139x^2227+a61dx^2226+be90x^2225+138cfx^2224+11c09x^2223+8c2bx^2222+3cd6x^2221+1302ex^2220+f0e4x^2219+23473x^2218+1063bx^2217+1f25x^2216+9bb9x^2215+8a9cx^2214+350bx^2213+10937x^2212+2e11x^2211+e655x^2210+1ffa8x^2209+27e45x^2208+27755x^2207+254a5x^2206+1a735x^2205+c406x^2204+1541dx^2203+1a48fx^2202+b6c8x^2201+111e7x^2200+5981x^2199+1bf85x^2198+13d96x^2197+133ecx^2196+1039ax^2195+1200x^2194+5a00x^2193+1c200x^2192+149fdx^2191+171efx^2190+239a9x^2189+12049x^2188+a16bx^2187+a716x^2186+c36dx^2185+15120x^2184+1959ex^2183+6c13x^2182+21c5fx^2181+8dd7x^2180+4532x^2179+159fax^2178+1c1e0x^2177+1495dx^2176+16ecfx^2175+22a09x^2174+d229x^2173+19accx^2172+85f9x^2171+1ddcx^2170+954cx^2169+6a7bx^2168+21467x^2167+65ffx^2166+1fdfbx^2165+275e4x^2164+24d70x^2163+1832cx^2162+fd9x^2161+4f3dx^2160+18c31x^2159+3cf2x^2158+130bax^2157+f3a0x^2156+2421fx^2155+14a97x^2154+174f1x^2153+248b3x^2152+16b7bx^2151+21965x^2150+7ef5x^2149+27ac9x^2148+265e9x^2147+1fd89x^2146+273aax^2145+2424ex^2144+14b82x^2143+17988x^2142+25fa6x^2141+1de3ax^2140+1d71fx^2139+1b398x^2138+101f5x^2137+9c7x^2136+30e3x^2135+f46fx^2134+2462ax^2133+15ecex^2132+1da04x^2131+1c211x^2130+14a52x^2129+17398x^2128+241f6x^2127+149cax^2126+170f0x^2125+234aex^2124+10762x^2123+24e8x^2122+b888x^2121+11aa7x^2120+8541x^2119+1a44x^2118+8354x^2117+10a3x^2116+532fx^2115+19febx^2114+9f94x^2113+9de3x^2112+956ex^2111+6b25x^2110+217b9x^2109+7699x^2108+250fdx^2107+194edx^2106+689ex^2105+20b16x^2104+376ax^2103+11512x^2102+6958x^2101+20eb8x^2100+4994x^2099+16fe4x^2098+22f72x^2097+ed36x^2096+2220dx^2095+aa3dx^2094+d330x^2093+19fefx^2092+9fa8x^2091+9e47x^2090+9762x^2089+74e9x^2088+2488dx^2087+16abdx^2086+215afx^2085+6c67x^2084+21e03x^2083+960bx^2082+6e36x^2081+2270ex^2080+c342x^2079+15049x^2078+1916bx^2077+5714x^2076+1b364x^2075+100f1x^2074+4b3x^2073+177fx^2072+757bx^2071+24b67x^2070+178ffx^2069+25cf9x^2068+1d0d9x^2067+1943ax^2066+651fx^2065+1f99bx^2064+26004x^2063+1e010x^2062+1e04dx^2061+1e17ex^2060+1e773x^2059+2053cx^2058+1a28x^2057+82c8x^2056+de7x^2055+4583x^2054+15b8fx^2053+1c9c9x^2052+170eax^2051+23490x^2050+106ccx^2049+21fax^2048+a9e2x^2047+d169x^2046+1970cx^2045+7339x^2044+2401dx^2043+1408dx^2042+142bfx^2041+14db9x^2040+1849bx^2039+1704x^2038+7314x^2037+23f64x^2036+13cf0x^2035+130aex^2034+f364x^2033+240f3x^2032+144bbx^2031+157a5x^2030+1b637x^2029+10f10x^2028+4b4ex^2027+17886x^2026+25a9cx^2025+1c508x^2024+15925x^2023+1bdb7x^2022+13490x^2021+106cex^2020+2204x^2019+aa14x^2018+d263x^2017+19beex^2016+8ba3x^2015+3a2ex^2014+122e6x^2013+ae7cx^2012+e86bx^2011+20a16x^2010+326ax^2009+fc12x^2008+26c59x^2007+21db9x^2006+9499x^2005+66fcx^2004+202ecx^2003+e98x^2002+48f8x^2001+16cd8x^2000+22036x^1999+a10ax^1998+a531x^1997+b9f4x^1996+121c3x^1995+a8cdx^1994+cc00x^1993+17bffx^1992+26bf9x^1991+21bd9x^1990+8b39x^1989+381cx^1988+1188cx^1987+7abax^1986+265a2x^1985+1fc26x^1984+26cbbx^1983+21fa3x^1982+9e2bx^1981+96d6x^1980+722dx^1979+23ae1x^1978+12661x^1977+bfe3x^1976+13f6ex^1975+13d24x^1974+131b2x^1973+f878x^1972+25a57x^1971+1c3afx^1970+15268x^1969+19c06x^1968+8c1bx^1967+3c86x^1966+12e9ex^1965+e914x^1964+20d63x^1963+42ebx^1962+14e97x^1961+188f1x^1960+2cb2x^1959+df7ax^1958+1dd61x^1957+1d2e2x^1956+19e67x^1955+9800x^1954+77ffx^1953+257fbx^1952+1b7e3x^1951+1176cx^1950+751ax^1949+24982x^1948+16f86x^1947+22d9cx^1946+e408x^1945+1f427x^1944+244c0x^1943+157bcx^1942+1b6aax^1941+1114fx^1940+5689x^1939+1b0adx^1938+f35ex^1937+240d5x^1936+14425x^1935+154b7x^1934+1a791x^1933+c5d2x^1932+15d19x^1931+1d17bx^1930+19764x^1929+74f1x^1928+248b5x^1927+16b85x^1926+21997x^1925+7fefx^1924+27fabx^1923+27e53x^1922+2779bx^1921+25603x^1920+1ae0bx^1919+e634x^1918+1ff03x^1917+27b0cx^1916+26738x^1915+20414x^1914+1460x^1913+65e0x^1912+1fd60x^1911+272ddx^1910+23e4dx^1909+1377dx^1908+1156fx^1907+6b29x^1906+217cdx^1905+76fdx^1904+252f1x^1903+19eb1x^1902+9972x^1901+7f39x^1900+27c1dx^1899+26c8dx^1898+21ebdx^1897+99adx^1896+8060x^1895+1dfx^1894+95bx^1893+2ec7x^1892+e9e3x^1891+2116ex^1890+5722x^1889+1b3aax^1888+1024fx^1887+b89x^1886+39adx^1885+12061x^1884+a1e3x^1883+a96ex^1882+cf25x^1881+18bb8x^1880+3a95x^1879+124e9x^1878+b88bx^1877+11ab6x^1876+858cx^1875+1bbbx^1874+8aa7x^1873+3542x^1872+10a4ax^1871+3370x^1870+10130x^1869+5eex^1868+1da6x^1867+943ex^1866+6535x^1865+1fa09x^1864+2622ax^1863+1eacex^1862+21603x^1861+6e0bx^1860+22637x^1859+bf0fx^1858+13b4ax^1857+12870x^1856+ca2ex^1855+172e5x^1854+23e77x^1853+1384fx^1852+11989x^1851+7fabx^1850+27e57x^1849+277afx^1848+25667x^1847+1afffx^1846+eff8x^1845+22fd7x^1844+ef2fx^1843+22beax^1842+db8ex^1841+1c9c5x^1840+170d6x^1839+2342cx^1838+104d8x^1837+1836x^1836+790ex^1835+25d46x^1834+1d25ax^1833+19bbfx^1832+8ab8x^1831+3597x^1830+10bf3x^1829+3bbdx^1828+12ab1x^1827+d573x^1826+1ab3ex^1825+d833x^1824+1b8fex^1823+11cf3x^1822+90bdx^1821+53b0x^1820+1a270x^1819+ac2dx^1818+dce0x^1817+1d05fx^1816+191d8x^1815+5935x^1814+1be09x^1813+1362ax^1812+10ed0x^1811+4a0ex^1810+17246x^1809+23b5cx^1808+128c8x^1807+cbe6x^1806+17b7dx^1805+2696fx^1804+20f27x^1803+4bbfx^1802+17abbx^1801+265a5x^1800+1fc35x^1799+26d06x^1798+2211ax^1797+a57ex^1796+bb75x^1795+12948x^1794+ce66x^1793+187fdx^1792+27eex^1791+c7a6x^1790+1663dx^1789+1ff2fx^1788+27be8x^1787+26b84x^1786+21990x^1785+7fccx^1784+27efcx^1783+27ae8x^1782+26684x^1781+20090x^1780+2ccx^1779+dfcx^1778+45ecx^1777+15d9cx^1776+1d40ax^1775+1a42fx^1774+b4e8x^1773+10887x^1772+2aa1x^1771+d525x^1770+1a9b8x^1769+d095x^1768+192e8x^1767+5e85x^1766+1d899x^1765+1bafax^1764+126dfx^1763+c259x^1762+14bbcx^1761+17aaax^1760+26550x^1759+1fa8cx^1758+264b9x^1757+1f799x^1756+255fax^1755+1addex^1754+e553x^1753+1fa9ex^1752+26513x^1751+1f95bx^1750+25ec4x^1749+1d9d0x^1748+1c10dx^1747+1453ex^1746+15a34x^1745+1c302x^1744+14f07x^1743+18b21x^1742+37a2x^1741+1162ax^1740+6ed0x^1739+22a10x^1738+d24cx^1737+19b7bx^1736+8964x^1735+2ef3x^1734+eabfx^1733+215bax^1732+6c9ex^1731+21f16x^1730+9b6ax^1729+8911x^1728+2d54x^1727+e2a4x^1726+1ed33x^1725+221fcx^1724+a9e8x^1723+d187x^1722+197a2x^1721+7627x^1720+24ec3x^1719+189cbx^1718+30f4x^1717+f4c4x^1716+247d3x^1715+1671bx^1714+20385x^1713+1195x^1712+57e9x^1711+1b78dx^1710+115bex^1709+6cb4x^1708+21f84x^1707+9d90x^1706+93cfx^1705+630ax^1704+1ef32x^1703+22bf7x^1702+dbcfx^1701+1cb0ax^1700+1772fx^1699+253e9x^1698+1a389x^1697+b1aax^1696+f851x^1695+25994x^1694+1bfe0x^1693+13f5dx^1692+13ccfx^1691+13009x^1690+f02bx^1689+230d6x^1688+f42ax^1687+244d1x^1686+15811x^1685+1b853x^1684+1199cx^1683+800ax^1682+31x^1681+f5x^1680+4c9x^1679+17edx^1678+77a1x^1677+25625x^1676+1aeb5x^1675+e986x^1674+20f9dx^1673+4e0dx^1672+18641x^1671+1f42x^1670+9c4ax^1669+8d71x^1668+4334x^1667+15004x^1666+19012x^1665+5057x^1664+191b3x^1663+587cx^1662+1ba6cx^1661+12419x^1660+b47bx^1659+10666x^1658+1ffcx^1657+9fecx^1656+9f9bx^1655+9e06x^1654+961dx^1653+6e90x^1652+228d0x^1651+cc0cx^1650+17c3bx^1649+26d25x^1648+221b5x^1647+a885x^1646+ca98x^1645+174f7x^1644+248d1x^1643+16c11x^1642+21c53x^1641+8d9bx^1640+4406x^1639+1541ex^1638+1a494x^1637+b6e1x^1636+11264x^1635+5bf2x^1634+1cbbax^1633+17a9fx^1632+26519x^1631+1f979x^1630+25f5ax^1629+1dcbex^1628+1cfb3x^1627+18e7cx^1626+4869x^1625+16a0dx^1624+2123fx^1623+5b37x^1622+1c813x^1621+1685cx^1620+209cax^1619+30eex^1618+f4a6x^1617+2473dx^1616+1642dx^1615+1f4dfx^1614+24858x^1613+169b4x^1612+21082x^1611+5286x^1610+19c9ex^1609+8f13x^1608+4b5ex^1607+178d6x^1606+25c2cx^1605+1ccd8x^1604+18035x^1603+106x^1602+51ex^1601+1996x^1600+7feex^1599+27fa6x^1598+27e3ax^1597+2771ex^1596+25392x^1595+1a1d6x^1594+a92bx^1593+cdd6x^1592+1852dx^1591+19dex^1590+8156x^1589+6adx^1588+2161x^1587+a6e5x^1586+c278x^1585+14c57x^1584+17db1x^1583+27473x^1582+2463bx^1581+15f23x^1580+1dbadx^1579+1ca5ex^1578+173d3x^1577+2431dx^1576+14f8dx^1575+18dbfx^1574+44b8x^1573+15798x^1572+1b5f6x^1571+10dcbx^1570+44f5x^1569+158c9x^1568+1bbebx^1567+12b94x^1566+d9e2x^1565+1c169x^1564+1470ax^1563+16330x^1562+1efeex^1561+22fa3x^1560+ee2bx^1559+226d6x^1558+c22ax^1557+14ad1x^1556+17613x^1555+24e5dx^1554+187cdx^1553+26fex^1552+c2f6x^1551+14ecdx^1550+189ffx^1549+31f8x^1548+f9d8x^1547+26137x^1546+1e60fx^1545+1fe48x^1544+27765x^1543+254f5x^1542+1a8c5x^1541+cbd6x^1540+17b2dx^1539+267dfx^1538+20757x^1537+24afx^1536+b76bx^1535+11516x^1534+696cx^1533+20f1cx^1532+4b88x^1531+179a8x^1530+26046x^1529+1e15ax^1528+1e6bfx^1527+201b8x^1526+894x^1525+2ae4x^1524+d674x^1523+1b043x^1522+f14cx^1521+2367bx^1520+11063x^1519+51edx^1518+199a1x^1517+8022x^1516+a9x^1515+34dx^1514+1081x^1513+5285x^1512+19c99x^1511+8efax^1510+4ae1x^1509+17665x^1508+24ff7x^1507+18fcfx^1506+4f08x^1505+18b28x^1504+37c5x^1503+116d9x^1502+723bx^1501+23b27x^1500+127bfx^1499+c6b9x^1498+1619cx^1497+1e80ax^1496+2082fx^1495+28e7x^1494+cc83x^1493+17e8ex^1492+278c4x^1491+25bd0x^1490+1cb0cx^1489+17739x^1488+2541bx^1487+1a483x^1486+b68cx^1485+110bbx^1484+53a5x^1483+1a239x^1482+ab1ax^1481+d781x^1480+1b584x^1479+10b91x^1478+39d3x^1477+1211fx^1476+a599x^1475+bbfcx^1474+12bebx^1473+db95x^1472+1c9e8x^1471+17185x^1470+23797x^1469+115efx^1468+6da9x^1467+2244dx^1466+b57dx^1465+10b70x^1464+392ex^1463+11de6x^1462+957cx^1461+6b6bx^1460+21917x^1459+7d6fx^1458+2732bx^1457+23fd3x^1456+13f1bx^1455+13b85x^1454+12997x^1453+cff1x^1452+18fb4x^1451+4e81x^1450+18885x^1449+2a96x^1448+d4eex^1447+1a8a5x^1446+cb36x^1445+1780dx^1444+2583fx^1443+1b937x^1442+11e10x^1441+964ex^1440+6f85x^1439+22d99x^1438+e3f9x^1437+1f3dcx^1436+24349x^1435+15069x^1434+1920bx^1433+5a34x^1432+1c304x^1431+14f11x^1430+18b53x^1429+389cx^1428+11b0cx^1427+873ax^1426+2421x^1425+b4a5x^1424+10738x^1423+2416x^1422+b46ex^1421+10625x^1420+1eb7x^1419+9993x^1418+7fdex^1417+27f56x^1416+27caax^1415+26f4ex^1414+22c82x^1413+de86x^1412+1d89dx^1411+1bb0ex^1410+12743x^1409+c44dx^1408+15580x^1407+1ab7ex^1406+d973x^1405+1bf3ex^1404+13c33x^1403+12cfdx^1402+e0efx^1401+1e4aax^1400+1f74fx^1399+25488x^1398+1a6a4x^1397+c131x^1396+145f4x^1395+15dc2x^1394+1d4c8x^1393+1a7e5x^1392+c776x^1391+1654dx^1390+1fa7fx^1389+26478x^1388+1f654x^1387+24fa1x^1386+18e21x^1385+46a2x^1384+1612ax^1383+1e5d0x^1382+1fd0dx^1381+2713ex^1380+23632x^1379+10ef6x^1378+4accx^1377+175fcx^1376+24deax^1375+1858ex^1374+1bc3x^1373+8acfx^1372+360ax^1371+10e32x^1370+46f8x^1369+162d8x^1368+1ee36x^1367+2270bx^1366+c333x^1365+14ffex^1364+18ff4x^1363+4fc1x^1362+18ec5x^1361+49d6x^1360+1712ex^1359+235e4x^1358+10d70x^1357+432ex^1356+14fe6x^1355+18f7cx^1354+4d69x^1353+1830dx^1352+f3ex^1351+4c36x^1350+17d0ex^1349+27144x^1348+23650x^1347+10f8cx^1346+4dbax^1345+184a2x^1344+1727x^1343+73c3x^1342+242cfx^1341+14e07x^1340+18621x^1339+1ea2x^1338+992ax^1337+7dd1x^1336+27515x^1335+24965x^1334+16ef5x^1333+22ac7x^1332+d5dfx^1331+1ad5ax^1330+e2bfx^1329+1edbax^1328+2249fx^1327+b717x^1326+11372x^1325+6138x^1324+1e618x^1323+1fe75x^1322+27846x^1321+2595ax^1320+1bebex^1319+139b3x^1318+1207dx^1317+a26fx^1316+ac2ax^1315+dcd1x^1314+1d014x^1313+19061x^1312+51e2x^1311+1996ax^1310+7f0fx^1309+27b4bx^1308+26873x^1307+20a3bx^1306+3323x^1305+ffafx^1304+27e6ax^1303+2780ex^1302+25842x^1301+1b946x^1300+11e5bx^1299+97c5x^1298+76d8x^1297+25238x^1296+19b14x^1295+8761x^1294+24e4x^1293+b874x^1292+11a43x^1291+834dx^1290+1080x^1289+5280x^1288+19c80x^1287+8e7dx^1286+4870x^1285+16a30x^1284+212eex^1283+5ea2x^1282+1d92ax^1281+1bdcfx^1280+13508x^1279+10926x^1278+2dbcx^1277+e4acx^1276+1f75bx^1275+254c4x^1274+1a7d0x^1273+c70dx^1272+16340x^1271+1f03ex^1270+23133x^1269+f5fbx^1268+24de6x^1267+1857ax^1266+1b5fx^1265+88dbx^1264+2c46x^1263+dd5ex^1262+1d2d5x^1261+19e26x^1260+96bbx^1259+71a6x^1258+2383ex^1257+11932x^1256+7df8x^1255+275d8x^1254+24d34x^1253+18200x^1252+9fdx^1251+31f1x^1250+f9b5x^1249+26088x^1248+1e2a4x^1247+1ed31x^1246+221f2x^1245+a9b6x^1244+d08dx^1243+192c0x^1242+5dbdx^1241+1d4b1x^1240+1a772x^1239+c537x^1238+15a12x^1237+1c258x^1236+14bb5x^1235+17a87x^1234+264a1x^1233+1f721x^1232+253a2x^1231+1a226x^1230+aabbx^1229+d5a6x^1228+1ac3dx^1227+dd2ex^1226+1d1e5x^1225+19976x^1224+7f4bx^1223+27c77x^1222+26e4fx^1221+22787x^1220+c59fx^1219+15c1ax^1218+1cc80x^1217+17e7dx^1216+2786fx^1215+25a27x^1214+1c2bfx^1213+14db8x^1212+18496x^1211+16ebx^1210+7297x^1209+23cf3x^1208+130bbx^1207+f3a5x^1206+24238x^1205+14b14x^1204+17762x^1203+254e8x^1202+1a884x^1201+ca91x^1200+174d4x^1199+24822x^1198+168a6x^1197+20b3cx^1196+3828x^1195+118c8x^1194+7be6x^1193+26b7ex^1192+21972x^1191+7f36x^1190+27c0ex^1189+26c42x^1188+21d46x^1187+925ax^1186+5bc1x^1185+1cac5x^1184+175d6x^1183+24d2cx^1182+181d8x^1181+935x^1180+2e09x^1179+e62dx^1178+1fee0x^1177+27a5dx^1176+263cdx^1175+1f2fdx^1174+23eeex^1173+13aa2x^1172+12528x^1171+b9c6x^1170+120ddx^1169+a44fx^1168+b58ax^1167+10bb1x^1166+3a73x^1165+1243fx^1164+b539x^1163+10a1cx^1162+328ax^1161+fcb2x^1160+26f79x^1159+22d59x^1158+e2b9x^1157+1ed9cx^1156+22409x^1155+b429x^1154+104ccx^1153+17fax^1152+77e2x^1151+2576ax^1150+1b50ex^1149+10943x^1148+2e4dx^1147+e781x^1146+20584x^1145+1b90x^1144+89d0x^1143+310fx^1142+f54bx^1141+24a76x^1140+1744ax^1139+24570x^1138+15b2cx^1137+1c7dax^1136+1673fx^1135+20439x^1134+1519x^1133+697dx^1132+20f71x^1131+4d31x^1130+181f5x^1129+9c6x^1128+30dex^1127+f456x^1126+245adx^1125+15c5dx^1124+1cdcfx^1123+18508x^1122+1925x^1121+7db9x^1120+2749dx^1119+2470dx^1118+1633dx^1117+1f02fx^1116+230e8x^1115+f484x^1114+24693x^1113+160dbx^1112+1e445x^1111+1f556x^1110+24aabx^1109+17553x^1108+24a9dx^1107+1750dx^1106+2493fx^1105+16e37x^1104+22711x^1103+c351x^1102+15094x^1101+192e2x^1100+5e67x^1099+1d803x^1098+1b80cx^1097+11839x^1096+791bx^1095+25d87x^1094+1d39fx^1093+1a218x^1092+aa75x^1091+d448x^1090+1a567x^1089+bb00x^1088+126ffx^1087+c2f9x^1086+14edcx^1085+18a4ax^1084+336fx^1083+1012bx^1082+5d5x^1081+1d29x^1080+91cdx^1079+5900x^1078+1bd00x^1077+130fdx^1076+f4efx^1075+248aax^1074+16b4ex^1073+21884x^1072+7a90x^1071+264d0x^1070+1f80cx^1069+25839x^1068+1b919x^1067+11d7ax^1066+9360x^1065+60dfx^1064+1e45bx^1063+1f5c4x^1062+24cd1x^1061+18011x^1060+52x^1059+19ax^1058+802x^1057+280ax^1056+c832x^1055+168f9x^1054+20cdbx^1053+4043x^1052+1414fx^1051+14689x^1050+160abx^1049+1e355x^1048+1f0a6x^1047+2333bx^1046+10023x^1045+adx^1044+361x^1043+10e5x^1042+5479x^1041+1a65dx^1040+bfcex^1039+13f05x^1038+13b17x^1037+12771x^1036+c533x^1035+159fex^1034+1c1f4x^1033+149c1x^1032+170c3x^1031+233cdx^1030+102fdx^1029+eefx^1028+4aabx^1027+17557x^1026+24ab1x^1025+17571x^1024+24b33x^1023+177fbx^1022+257e5x^1021+1b775x^1020+11546x^1019+6a5cx^1018+213ccx^1017+62f8x^1016+1eed8x^1015+22a35x^1014+d305x^1013+19f18x^1012+9b75x^1011+8948x^1010+2e67x^1009+e803x^1008+2080ex^1007+2842x^1006+c94ax^1005+16e71x^1004+22833x^1003+c8fbx^1002+16ce6x^1001+2207cx^1000+a268x^999+ac07x^998+dc22x^997+1cca9x^996+17f4ax^995+27c70x^994+26e2cx^993+226d8x^992+c234x^991+14b03x^990+1770dx^989+2533fx^988+1a037x^987+a110x^986+a54fx^985+ba8ax^984+124b1x^983+b773x^982+1153ex^981+6a34x^980+21304x^979+5f10x^978+1db50x^977+1c88dx^976+16abex^975+215b4x^974+6c80x^973+21e80x^972+987cx^971+7a6bx^970+26417x^969+1f46fx^968+24628x^967+15ec4x^966+1d9d2x^965+1c117x^964+14570x^963+15b2ex^962+1c7e4x^961+16771x^960+20533x^959+19fbx^958+81e7x^957+982x^956+2f8ax^955+edb2x^954+22479x^953+b659x^952+10fbcx^951+4eaax^950+18952x^949+2e97x^948+e8f3x^947+20cbex^946+3fb2x^945+13e7ax^944+13860x^943+119dex^942+8154x^941+6a3x^940+212fx^939+a5ebx^938+bd96x^937+133edx^936+1039fx^935+1219x^934+5a7dx^933+1c471x^932+15632x^931+1aef8x^930+ead5x^929+21628x^928+6ec4x^927+229d4x^926+d120x^925+1959fx^924+6c18x^923+21c78x^922+8e54x^921+47a3x^920+1662fx^919+1fee9x^918+27a8ax^917+264aex^916+1f762x^915+254e7x^914+1a87fx^913+ca78x^912+17457x^911+245b1x^910+15c71x^909+1ce33x^908+186fcx^907+22e9x^906+ae8dx^905+e8c0x^904+20bbfx^903+3ab7x^902+12593x^901+bbddx^900+12b50x^899+d88ex^898+1bac5x^897+125d6x^896+bd2cx^895+131dbx^894+f945x^893+25e58x^892+1d7b4x^891+1b681x^890+11082x^889+5288x^888+19ca8x^887+8f45x^886+4c58x^885+17db8x^884+27496x^883+246eax^882+1628ex^881+1ecc4x^880+21fd1x^879+9f11x^878+9b54x^877+88a3x^876+2b2ex^875+d7e6x^874+1b77dx^873+1156ex^872+6b24x^871+217b4x^870+7680x^869+25080x^868+1927cx^867+5c69x^866+1ce0dx^865+1863ex^864+1f33x^863+9bffx^862+8bfax^861+3be1x^860+12b65x^859+d8f7x^858+1bcd2x^857+13017x^856+f071x^855+23234x^854+fb00x^853+266ffx^852+202f7x^851+ecfx^850+4a0bx^849+17237x^848+23b11x^847+12751x^846+c493x^845+156dex^844+1b254x^843+fba1x^842+26a24x^841+212b0x^840+5d6cx^839+1d31cx^838+19f89x^837+9daax^836+9451x^835+6594x^834+1fbe4x^833+26b71x^832+21931x^831+7df1x^830+275b5x^829+24c85x^828+17e95x^827+278e7x^826+25c7fx^825+1ce77x^824+18850x^823+298dx^822+cfc1x^821+18ec4x^820+49d1x^819+17115x^818+23567x^817+10affx^816+36f9x^815+112ddx^814+5e4fx^813+1d78bx^812+1b5b4x^811+10c81x^810+3e83x^809+1388fx^808+11ac9x^807+85ebx^806+1d96x^805+93eex^804+63a5x^803+1f239x^802+23b1ax^801+1277ex^800+c574x^799+15b43x^798+1c84dx^797+1697ex^796+20f74x^795+4d40x^794+18240x^793+b3dx^792+3831x^791+118f5x^790+7cc7x^789+26fe3x^788+22f6bx^787+ed13x^786+2215ex^785+a6d2x^784+c219x^783+14a7cx^782+1746ax^781+24610x^780+15e4cx^779+1d77ax^778+1b55fx^777+10ad8x^776+3636x^775+10f0ex^774+4b44x^773+17854x^772+259a2x^771+1c026x^770+140bbx^769+143a5x^768+15237x^767+19b11x^766+8752x^765+2499x^764+b6fdx^763+112f0x^762+5eaex^761+1d966x^760+1befbx^759+13ae4x^758+12672x^757+c038x^756+14117x^755+14571x^754+15b33x^753+1c7fdx^752+167eex^751+207a4x^750+2630x^749+bef0x^748+13aafx^747+12569x^746+bb0bx^745+12736x^744+c40cx^743+1543bx^742+1a525x^741+b9b6x^740+1208dx^739+a2bfx^738+adbax^737+e4a1x^736+1f724x^735+253b1x^734+1a271x^733+ac32x^732+dcf9x^731+1d0dcx^730+19449x^729+656ax^728+1fb12x^727+26757x^726+204afx^725+1767x^724+7503x^723+2490fx^722+16d47x^721+22261x^720+abe1x^719+db64x^718+1c8f3x^717+16cbcx^716+21faax^715+9e4ex^714+9785x^713+7598x^712+24bf8x^711+17bd4x^710+26b22x^709+217a6x^708+763ax^707+24f22x^706+18ba6x^705+3a3bx^704+12327x^703+afc1x^702+eec4x^701+229d3x^700+d11bx^699+19586x^698+6b9bx^697+21a07x^696+821fx^695+a9ax^694+3502x^693+1090ax^692+2d30x^691+e1f0x^690+1e9afx^689+21068x^688+5204x^687+19a14x^686+8261x^685+be4x^684+3b74x^683+12944x^682+ce52x^681+18799x^680+25fax^679+bde2x^678+13569x^677+10b0bx^676+3735x^675+11409x^674+642bx^673+1f4d7x^672+24830x^671+168ecx^670+20c9ax^669+3efex^668+13af6x^667+126ccx^666+c1fax^665+149e1x^664+17163x^663+236edx^662+1129dx^661+5d0fx^660+1d14bx^659+19674x^658+7041x^657+23145x^656+f655x^655+24fa8x^654+18e44x^653+4751x^652+16495x^651+1f6e7x^650+25280x^649+19c7cx^648+8e69x^647+480cx^646+1683cx^645+2092ax^644+2dcex^643+e506x^642+1f91dx^641+25d8ex^640+1d3c2x^639+1a2c7x^638+ade0x^637+e55fx^636+1fadax^635+2663fx^634+1ff37x^633+27c10x^632+26c4cx^631+21d78x^630+9354x^629+60a3x^628+1e32fx^627+1efe8x^626+22f85x^625+ed95x^624+223e8x^623+b384x^622+10193x^621+7ddx^620+2751x^619+c495x^618+156e8x^617+1b286x^616+fc9bx^615+26f06x^614+22b1ax^613+d77ex^612+1b575x^611+10b46x^610+385cx^609+119ccx^608+80fax^607+4e1x^606+1865x^605+79f9x^604+261ddx^603+1e94dx^602+20e7ex^601+4872x^600+16a3ax^599+21320x^598+5f9cx^597+1de0cx^596+1d639x^595+1af1ax^594+eb7fx^593+2197ax^592+7f5ex^591+27cd6x^590+2702ax^589+230cex^588+f402x^587+24409x^586+15429x^585+1a4cbx^584+b7f4x^583+117c3x^582+76cdx^581+25201x^580+19a01x^579+8202x^578+a09x^577+322dx^576+fae1x^575+26664x^574+1fff0x^573+27fadx^572+27e5dx^571+277cdx^570+256fdx^569+1b2edx^568+fe9ex^567+27915x^566+25d65x^565+1d2f5x^564+19ec6x^563+99dbx^562+8146x^561+65dx^560+1fd1x^559+9f15x^558+9b68x^557+8907x^556+2d22x^555+e1aax^554+1e851x^553+20992x^552+2fd6x^551+ef2ex^550+22be5x^549+db75x^548+1c948x^547+16e65x^546+227f7x^545+c7cfx^544+1670ax^543+20330x^542+fecx^541+4f9cx^540+18e0cx^539+4639x^538+15f1dx^537+1db8fx^536+1c9c8x^535+170e5x^534+23477x^533+1064fx^532+1f89x^531+9dadx^530+9460x^529+65dfx^528+1fd5bx^527+272c4x^526+23dd0x^525+1350cx^524+1093ax^523+2e20x^522+e6a0x^521+2011fx^520+597x^519+1bf3x^518+8bbfx^517+3abax^516+125a2x^515+bc28x^514+12cc7x^513+dfe1x^512+1df64x^511+1dcf1x^510+1d0b2x^509+19377x^508+6150x^507+1e690x^506+200cdx^505+3fdx^504+13f1x^503+63b5x^502+1f289x^501+23caax^500+12f4ex^499+ec84x^498+21e93x^497+98dbx^496+7c46x^495+26d5ex^494+222d2x^493+ae16x^492+e66dx^491+20020x^490+9cx^489+30cx^488+f3cx^487+4c2cx^486+17cdcx^485+2704ax^484+2316ex^483+f722x^482+253a9x^481+1a249x^480+ab6ax^479+d911x^478+1bd54x^477+132a1x^476+fd23x^475+271aex^474+23862x^473+119e6x^472+817cx^471+76bx^470+2517x^469+b973x^468+11f3ex^467+9c34x^466+8d03x^465+410ex^464+14546x^463+15a5cx^462+1c3cax^461+152efx^460+19ea9x^459+994ax^458+7e71x^457+27835x^456+25905x^455+1bd15x^454+13166x^453+f6fcx^452+252ebx^451+19e93x^450+98dcx^449+7c4bx^448+26d77x^447+2234fx^446+b087x^445+f2a2x^444+23d29x^443+131c9x^442+f8ebx^441+25c96x^440+1ceeax^439+18a8fx^438+34c8x^437+107e8x^436+2786x^435+c59ex^434+15c15x^433+1cc67x^432+17e00x^431+275fex^430+24df2x^429+185b6x^428+1c8bx^427+8eb7x^426+4992x^425+16fdax^424+22f40x^423+ec3cx^422+21d2bx^421+91d3x^420+591ex^419+1bd96x^418+133ebx^417+10395x^416+11e7x^415+5983x^414+1bf8fx^413+13dc8x^412+134e6x^411+1087cx^410+2a6ax^409+d412x^408+1a459x^407+b5bax^406+10ca1x^405+3f23x^404+13bafx^403+12a69x^402+d40bx^401+1a436x^400+b50bx^399+10936x^398+2e0cx^397+e63cx^396+1ff2bx^395+27bd4x^394+26b20x^393+2179cx^392+7608x^391+24e28x^390+186c4x^389+21d1x^388+a915x^387+cd68x^386+18307x^385+f20x^384+4ba0x^383+17a20x^382+2629ex^381+1ed12x^380+22157x^379+a6afx^378+c16ax^377+14711x^376+16353x^375+1f09dx^374+2330ex^373+ff42x^372+27c49x^371+26d69x^370+22309x^369+af29x^368+ebccx^367+21afbx^366+86e3x^365+226ex^364+ac26x^363+dcbdx^362+1cfb0x^361+18e6dx^360+481ex^359+16896x^358+20aecx^357+3698x^356+110f8x^355+54d6x^354+1a82ex^353+c8e3x^352+16c6ex^351+21e24x^350+96b0x^349+716fx^348+2372bx^347+113d3x^346+631dx^345+1ef91x^344+22dd2x^343+e516x^342+1f96dx^341+25f1ex^340+1db92x^339+1c9d7x^338+17130x^337+235eex^336+10da2x^335+4428x^334+154c8x^333+1a7e6x^332+c77bx^331+16566x^330+1fafcx^329+266e9x^328+20289x^327+ca9x^326+3f4dx^325+13c81x^324+12e83x^323+e88dx^322+20ac0x^321+35bcx^320+10cacx^319+3f5ax^318+13cc2x^317+12fc8x^316+eee6x^315+22a7dx^314+d46dx^313+1a620x^312+be9dx^311+13910x^310+11d4ex^309+9284x^308+5c93x^307+1cedfx^306+18a58x^305+33b5x^304+10289x^303+cabx^302+3f57x^301+13cb3x^300+12f7dx^299+ed6fx^298+2232ax^297+afcex^296+ef05x^295+22b18x^294+d774x^293+1b543x^292+10a4cx^291+337ax^290+10162x^289+6e8x^288+2288x^287+aca8x^286+df47x^285+1dc62x^284+1cde7x^283+18580x^282+1b7dx^281+8971x^280+2f34x^279+ec04x^278+21c13x^277+8c5bx^276+3dc6x^275+134dex^274+10854x^273+29a2x^272+d02ax^271+190d1x^270+5412x^269+1a45ax^268+b5bfx^267+10cbax^266+3fa0x^265+13e20x^264+1369ex^263+11114x^262+5562x^261+1aaeax^260+d68fx^259+1b0cax^258+f3efx^257+243aax^256+1524ex^255+19b84x^254+8991x^253+2fd4x^252+ef24x^251+22bb3x^250+da7bx^249+1c466x^248+155fbx^247+1ade5x^246+e576x^245+1fb4dx^244+2687ex^243+20a72x^242+3436x^241+1050ex^240+1944x^239+7e54x^238+277a4x^237+25630x^236+1aeecx^235+ea99x^234+214fcx^233+68e8x^232+20c88x^231+3ea4x^230+13934x^229+11e02x^228+9608x^227+6e27x^226+226c3x^225+c1cbx^224+148f6x^223+16cccx^222+21ffax^221+9fdex^220+9f55x^219+9ca8x^218+8f47x^217+4c62x^216+17deax^215+27590x^214+24bccx^213+17af8x^212+266d6x^211+2022ax^210+acex^209+3606x^208+10e1ex^207+4694x^206+160e4x^205+1e472x^204+1f637x^203+24f10x^202+18b4cx^201+3879x^200+11a5dx^199+83cfx^198+130ax^197+5f32x^196+1dbfax^195+1cbdfx^194+17b58x^193+268b6x^192+20b8ax^191+39aex^190+12066x^189+a1fcx^188+a9ebx^187+d196x^186+197edx^185+779ex^184+25616x^183+1ae6ax^182+e80fx^181+2084ax^180+296ex^179+cf26x^178+18bbdx^177+3aaex^176+12566x^175+bafcx^174+126ebx^173+c295x^172+14ce8x^171+18086x^170+29bx^169+d07x^168+4123x^167+145afx^166+15c69x^165+1ce0bx^164+18634x^163+1f01x^162+9b05x^161+8718x^160+2377x^159+b153x^158+f69ex^157+25115x^156+19565x^155+6af6x^154+216cex^153+7202x^152+23a0ax^151+1222ex^150+aae4x^149+d673x^148+1b03ex^147+f133x^146+235fex^145+10df2x^144+45b8x^143+15c98x^142+1cef6x^141+18acbx^140+35f4x^139+10dc4x^138+44d2x^137+1581ax^136+1b880x^135+11a7dx^134+846fx^133+162ax^132+6ed2x^131+22a1ax^130+d27ex^129+19c75x^128+8e46x^127+475dx^126+164d1x^125+1f813x^124+2585cx^123+1b9c8x^122+120e5x^121+a477x^120+b652x^119+10f99x^118+4dfbx^117+185e7x^116+1d80x^115+9380x^114+617fx^113+1e77bx^112+20564x^111+1af0x^110+86b0x^109+216fx^108+a72bx^107+c3d6x^106+1532dx^105+19fdfx^104+9f58x^103+9cb7x^102+8f92x^101+4dd9x^100+1853dx^99+1a2ex^98+82e6x^97+e7dx^96+4871x^95+16a35x^94+21307x^93+5f1fx^92+1db9bx^91+1ca04x^90+17211x^89+23a53x^88+1239bx^87+b205x^86+fa18x^85+26277x^84+1ec4fx^83+21d88x^82+93a4x^81+6233x^80+1eaffx^79+216f8x^78+72d4x^77+23e24x^76+136b0x^75+1116ex^74+5724x^73+1b3b4x^72+10281x^71+c83x^70+3e8fx^69+138cbx^68+11bf5x^67+8bc7x^66+3ae2x^65+1266ax^64+c010x^63+1404fx^62+14189x^61+147abx^60+16655x^59+1ffa7x^58+27e40x^57+2773cx^56+25428x^55+1a4c4x^54+b7d1x^53+11714x^52+7362x^51+240eax^50+1448ex^49+156c4x^48+1b1d2x^47+f917x^46+25d72x^45+1d336x^44+1a00bx^43+a034x^42+a103x^41+a50ex^40+b945x^39+11e58x^38+97b6x^37+768dx^36+250c1x^35+193c1x^34+62c2x^33+1edcax^32+224efx^31+b8a7x^30+11b42x^29+8848x^28+2967x^27+cf03x^26+18b0ex^25+3743x^24+1144fx^23+6589x^22+1fbadx^21+26a5ex^20+213d2x^19+6316x^18+1ef6ex^17+22d23x^16+e1abx^15+1e856x^14+209abx^13+3053x^12+f19fx^11+2381ax^10+1187ex^9+7a74x^8+26444x^7+1f550x^6+24a8dx^5+174bdx^4+247afx^3+16667x^2+0x^1'
testx=testx.replace("+"," + ")

plaintext_test=sealapi.Plaintext(testx)

ciphertext_fin1=sealapi.Ciphertext()
evaluator.add(ciphertext_a_minus_b,ciphertext_b_minus_a,ciphertext_fin1)

ciphertext_fin2=sealapi.Ciphertext()
evaluator.add(ciphertext_3a_minus_b,ciphertext_a_minus_3b,ciphertext_fin2)

ciphertext_fin3=sealapi.Ciphertext()
evaluator.add(ciphertext_fin1,ciphertext_fin2,ciphertext_fin3)

ciphertext_fin4=sealapi.Ciphertext()
evaluator.multiply_plain(ciphertext_fin3,plaintext_test,ciphertext_fin4)
ciphertext_fin4.save("./computation")
choose(2,ctx,secret_key,decryptor,a,b)

结语

这是第一次完整的复现难度高的比赛题了,中间写写停停,不过好在没有放弃,用了一周的时间完成复现,还需继续加油