ETH Price: $2,423.54 (+0.33%)

Transaction Decoder

Block:
19056139 at Jan-21-2024 03:29:23 PM +UTC
Transaction Fee:
0.013559085311678046 ETH $32.86
Gas Used:
654,606 Gas / 20.713353241 Gwei

Emitted Events:

279 MemoryPageFactRegistry.LogMemoryPageFactContinuous( factHash=8317CA028896B01725CB9AD6BB3D4AB2100A5208E5C6E77DC389AC451CB6B69D, memoryHash=49919059170112521859426307131580143744985211963000730131425805673309365460814, prod=552913045675434751078547045895083600649930684704288439160345785510915300714 )

Account State Difference:

  Address   Before After State Difference Code
0x16D5783a...6B29589A4
(SHARP Blockchain Writer)
452.995718174692050832 Eth
Nonce: 1141076
452.982159089380372786 Eth
Nonce: 1141077
0.013559085311678046
(builder0x69)
3.988641664450533896 Eth3.988707125050533896 Eth0.0000654606
0xFD14567e...1ca7fD1b4
(StarkEx: SHARP)

Execution Trace

MemoryPageFactRegistry.registerContinuousMemoryPage( startAddr=3795413, values=[180, 1, 1, 513281, 1824555148730198906588257143298668328950567520303612287959444456936793110939, 158098919692956613592021320609952044916245725306097615271255138786123, 32, 48515212218537555718005633172132826656399643356804529079242981878506874305, 17061262495640764987541247116045423460840, 48541987318188669730104973442689821281866413730106301000027807581924424375, 263274804747613498700454210344860420763966, 183820082740043596333594665626590506172585363083592309507886255574674863780, 124498161225599389230320972418632, 345381334118464255126052493771507379815109476557698899710045454408725427272, 6933590996233255046991423760969935887804425109237846873183051786186629, 387787794450325355712905118136950336927944789508513001286508929292088490385, 8866486319005412, 431547474510769702155100159945148009395846458350141606592086115523815136618, 1135075666711972511, 475276436903558249067497347229463309825317806407799970446425883480481756991, 3618502788666131213697322783095070105623107215331596699973091534158800156360, 622645643920172509462336411410067161928488532189453385356572428909257085296, 4185210257947114348379, 663187414563151320709616755263331695407841114884320791211964651622436188671, 14403236724491773294, 937345983583519873284404485236519743766176961670027462038500476491579260972, 1851192626986356797424340670855523987933433813855516217899814580, 1059362078634140136682859416527600866778078403912964476479416922499104370410, 1599844744200938065966, 1591856440180569099423799884509746626857169741426688121788780458563988174777, 41971401176056088, 1639990722055035683781360898735951127769029977105654507103936291049154362534, 1599844744200938065966, 1924351588721379419723438858663394693456459663237759269395425665912718051091, 6933589013271708431397423742188713938820222504541908414796217895008864, 1972640192590292121745188909541438638236900464745877898886385688591982544835, 1575578167232890209490071077731489, 1972640192590292121745188909541438638236900464745877898886385688591982544836, 1580104815121478216844016775849856, 2118936601605676259859678985739740720654072718673654605402361368276369932356, 6946148657834699653866168306118773922229371039261293083336847185131769, 2160077072399659251337351344297953585693789938776432897270322336858659586211, 58741138592860913241127, 2228587327193083716109407420185383142116024217638096218032987595692409626219, 63653694593196333212296201969336270825670, 2518949344685469529220777448537512830719636143989890220732135051549126237639, 21040006808659608629443605370778515844817, 2518949344685469529220777448537512830719636143989890220732135051549126237640, 80589744453965926932450513700523, 2675579869859583559478485700915697590983083597617336948197136870120690330861, 598340278587833758, 2675579869859583559478485700915697590983083597617336948197136870120690330862, 4553191436935761796929905250901536, 2675579869859583559478485700915697590983083597617336948197136870120690330863, 5299607220067068808912861944835077, 2689137372559291693435137108350243773929020722808920296341442340737997440864, 3618502788666131213697322783095070105623107215331596695787881798188757672102, 2765397701906069858950113220624645406880918410054333274291222763262473796233, 729475955878831, 2801775683533028833245556080371924653027942290851091438182089449993171279388, 0, 2801775683533028833245556080371924653027942290851091438182089449993171279389, 0, 2801775683533028833245556080371924653027942290851091438182089449993171279390, 0, 3274222570172811832288067067743914637922692210939640585557904077020485869445, 41537521355538576150816568463474361772372161300569296813926858338298, 3404541394193733802554195027606670179267342339724162669717612175453765244869, 6933591187458882313811266550463424876401760267641564190527206168330864, 3540784155146463892772734708271613933670179793548928383981963282521520094705, 15125686421, 246930652783857782251838442103670756662366630621379341567502181154550565, 6, 69036229591699849960932814930274583219423937176044869651883289380133062597, 375599906200578950302403931117463, 731009553143347574080655238666149040102619103132239422267183761870156583437, 138875564119209886172882815835250583127, 731009553143347574080655238666149040102619103132239422267183761870156583438, 390251354466, 860370950108688216340004790080337058268427944294306403669698046952904826247, 360214230897822791156, 1446821757104641781948757487033289620065803269090287896475220893178955257282, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 890747529808, 39820492990021488781126296258976579253012415299101875410803580162783534236, 1438846037749345026048, 55387854192604758194085830025024414809443476292062947273380832147275895305, 147573952589676412928, 86162676518689638632860154151409326696868296869892559148147232371318760667, 2, 3241680428079415362040147253069320458923381869475957411382602904045354461403, 187870570776255707762, 3320641650225249050758673725420010412004082948417409735256304827825077968334, 4559223198021602317647948, 92613767436713387596572723824913205567041778625633165937229649646076982379, 885443715538058477568, 99710664470018451664324333149989325061474486865438357983926706266181666956, 534955578137576996864, 119134845839987279890978847235787330034241304509815234561926277903221623918, 5, 603278275252936218847294002513349627170936020082667936993356353388973422646, 146621460273129483538, 997116358147278879200806290119301427563317904130805105009530830273380364308, 78621361947731149136, 1372909566081305234606563101467771535440483759017820324145015531996874824523, 900014918523, 1400241415590976231470478767545868569968092916595280198131101457403339390070, 1705836946, 1485697324314377296774075744519964352768831667301137794055595273886174571271, 102603146857227739789, 144179792250314152435626478460563956967492658596568014083066361014419450958, 793209995169510719488, 162446446956543010961556837667215280529275373983848611729812351603616824623, 1180591620717411303424, 173601060689794192183818262091635550763183781728626569748537647728310524197, 147573952589676412928, 185737424201398497167344167959067540566229443245220632491079834800567702806, 6, 110244652309005374945798656755709771675416732780445712498678505832701316319, 998586359259201367, 138836169848540343002265209867274254697778318298195092277383810183877129713, 12626194912583073943, 1042064173078032847147380598477853770687611561233835971197476790740704582249, 555566074626954357376902720, 1069957209920529897639429815846373617809486122855940281455921704638670321541, 40608373307527710492873441399, 1307423984895089609360774513102017208534062222438544567594916900687590663291, 1705836946, 1720794232242994781284872244532386137553814968655022101269663356738117448992, 31265084776, 221184266622272762494989387637100919747017218431548821946109756914856224762, 793209995169510719488, 228127240820201420112041055406192968922581942321662179607685569770048015434, 3, 827220861550361775567781794488524801583671955481509831981744502253130788360, 388162424575, 2056412668049510940615103414180044371230942148893240032791745910809459502031, 1092039417, 3559447904501404250275480099936892966582464373342140774808755542992234695323, 0, 260453785850506658232788892148310092451652754837931881549907848487383732724, 1051464412201444442112, 286257282373155859823440129216322525642860280778205950923663063653277884920, 10, 110244652309005374945798656755709771675416732780445712498678505832701316319, 23622578809164980690593209, 138836169848540343002265209867274254697778318298195092277383810183877129713, 1501265826565488174, 408890133999306816616425417929828160048345306837190881907386423581382461502, 1705836946, 408890133999306816616425417929828160048345306837190881907386423581382461503, 20622692449408739268192429, 408890133999306816616425417929828160048345306837190881907386423581382461505, 23622578809164980690593209, 486071989894428200485324289381869208808576294876002423450288492703312421896, 3903, 1042064173078032847147380598477853770687611561233835971197476790740704582249, 20622692449408739268192429, 1069957209920529897639429815846373617809486122855940281455921704638670321541, 54535910425018555, 1307423984895089609360774513102017208534062222438544567594916900687590663291, 1705836946, 1720794232242994781284872244532386137553814968655022101269663356738117448992, 1726571840222804588, 354660877577131715790726546197366907159790226513669223896123225579828500744, 903890459611768029184, 358810199151218248631742943895848912302453816508596486318701657214701944486, 2, 1449143547645090542063072844265667315741990491499711687374710081456680373746, 679364, 1449143547645090542063072844265667315741990491499711687374710081456680373750, 1705836946, 365479955388083627438071984988461406323421429866181237569300032271920358655, 774763251095801167872, 367197906183797993130452795711865096328910691665422431405262502990466134059, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 35874136767405756203, 860370950108688216340004790080337058268427944294306403669698046952904826247, 88403469336888674884373, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 87709747348, 368329164836235648820511070424923444258130069539051849626771250612998343756, 5, 446127535987530822843443754568064058475455177152358443253709926349977944910, 592501273769, 1174987432824581858839632426818705946102296612739133317214367202361599722109, 9118502130390428965, 1174987432824581858839632426818705946102296612739133317214367202361599722111, 22632757694, 1174987432824581858839632426818705946102296612739133317214367202361599722113, 1705836946, 1174987432824581858839632426818705946102296612739133317214367202361599722116, 1947003265244234, 375652019962862350898493560943460390755432266102814483812605654398767216991, 627189298506124754944, 385291772725090318157700937045086145273563247402457518748197066808155336371, 12, 630942870508318432141244231676368763314719218220627283696025745819266478034, 62931402586159161247549, 654570951647347405568317023887877977006047437173852252854263379553900581537, 201800935046253565354709, 786100558127391346725550254651754393695395283435218301895430566684302711431, 0, 899932272201857440938707861958161604453394922557970963652124921842270403383, 49536241424686311, 1138102585933080762687588574951940568393916737061955149298889590431930889549, 132935258028129489894012, 1297713107789520337982513184691958288380927033924334369025906284470037001886, 301213838574408580109221, 1560921487567308431829790790200273889245721757140345143424183877037500910805, 0, 2036043278992204991016020667909190298159749660306569848009667336209903525757, 1484058519865749108768, 2140787932137939563004847676671593573682336282002237867477494917576259390350, 2482229142220974978, 2340807897004777251049318502025916417250142060211860310052557593464664941127, 16286359070018445424, 2650525587979760243536244492935258079594240371076596729522476320712808148636, 88403469336888674884373, 2957942310104654943784327830847651434951875901449625736985295315790583647910, 0, 388427748632157500475051738471620534725585257428037676762777247708657723832, 1199038364791120855040, 400901871822703125016127946776087150118169137446520502024077402883299591047, 737869762948382064640, 417050888080687995320944871290302044836306411116643004536700093571972826566, 2600990914393046777856, 467359278613506166151492726487752216059557962335532790304583050955123345960, 8, 321751264442790402984935101055086840420519863546320125522244203922488951779, 105146732688629563951135, 321751264442790402984935101055086840420519863546320125522244203922488951782, 42222821589478890044, 673143856235664276639197094587692394632908329298733157837808988829211446536, 147973452563760827332, 673143856235664276639197094587692394632908329298733157837808988829211446539, 170413887531880500476, 1032717993920308306191823419406815870858725944687744986845677154805147281824, 293510857189932211073, 1032717993920308306191823419406815870858725944687744986845677154805147281827, 726260025000, 2115492923921523814468632200599040563669287468411561214414663525667701459652, 72835526004205994231, 2115492923921523814468632200599040563669287468411561214414663525667701459655, 180646745180, 471628519931846617465142146132066318864334758115234711506750392333400660198, 308005285798728383332352, 480435010446315883840438578877522761530389555098284169902231289323938321852, 306345078832094523686912, 482876828289395875538132910579471976747156502741786274588755116050381611281, 12, 328180471491496024943788644707421128491368795775743189813970882154833582011, 70454588701955412328547856814, 677354190155201038743814045316493356103373441409500801990605276230462941219, 3941770375672368389883269, 1221781105786407805373409553696982484825146986114884942115053297808274279725, 23901621861018117356955582163370392, 1346935111623457922835109395913052593384289375301391022701050325983491543226, 292175972697224350385832030125328980405, 1976220623523191349324542650432686162123437760609267222176361789404596074743, 798583, 2098812999887966088271632188546537644100645662027595579976334003949714660354, 939992094559418014245013798, 2135214683303008331177757339611508857829368359228963747490316827653422227919, 32520513300418777500541540082575684, 2227491212605259883677851203085742255333489384650021936610862782601500425996, 1145785, 2543099894867133524340843053517697964752397199547159189421490959187941861013, 809094, 2811754291036696793497364876323597674113141823838398142427074544061952788740, 1589840044099551028711043360, 2916705591420403631775404502643531484211278946290767124504206763108368797871, 107471375098238434134677856405653, 3140248821951574624844180962444161685730174041770400324558933847860905817999, 217093448655710122306196363331891619750, 491392883295944150758612343622473624536033994111817341260493697200877263863, 1254378597012249509888, 499011509030532331389330248145649109654783908452593301806967062061832541611, 793209995169510719488, 517125115337780208081305629975956820263165114138824120841711207270231259977, 2, 2133417755272289681395706846168920136393763360500477202158779672022110527540, 26418760650944068490230, 3042110419749088223152040564491991791141724500257181925529543070377045707076, 0, 520686016107374737760521730456644635535917710590070930399476581427515264358, 866996971464348925952, 528105677071584805410017592879967240284257929001505433044576761614959711304, 682529530727253409792, 538473411598945551799678206362774896575981605207021458379030594387546950812, 885443715538058477568, 541029956418163677912739296933083424090946220843418607677155668910297643717, 645636042579834306560, 581242126663212793060106513337825753533616525465610553380288042117872211035, 1549526502191602335744, 590819146674503166204135088463766346093745200688482655814515797828741941216, 2, 1634552087005115237442252525742193657531230359836617593428753446330801626681, 39354465992013370, 2231119801438030504752082497018646970052646144259125129625730892241813743353, 0, 694215953840094460542439575642144352849159930661074949609200968606949381632, 1106804644422573096960, 713051596836001528496073394359607372326929561379490744347265050695116120062, 590295810358705651712, 714825592785755213041694032536785726507211486527759547930222034069166573366, 7507824837999787507712, 773419650418337517107856101029931836850298774485466530128029681791734852785, 10, 329379553370786317903850612005382110609300412128522341427245109762726853881, 10385681046867114, 651389508803974051097098442497679188789949502464410012119944369132655838825, 121918006058114, 827220861550361775567781794488524801583671955481509831981744502253130788360, 2416955493498595128497, 1962530580270505527799196845881937104853972033181052133483259421336919144335, 0, 2056412668049510940615103414180044371230942148893240032791745910809459502031, 739223160116952448, 2143580227620253410095831357844798967756376392862957473742703019831998168569, 99829662051, 2407877884708520741080173077282821210757820837229219305898992828022203661417, 3004542916280374, 2700047839577939781277116445445844292037352708900680108328138192555279701431, 99829662051, 2772125646477834676125946173554578475420724326980415219987647446454539335547, 5514460630162086, 3147089384613653783654130171329162238996942503636065218062549913945119501655, 0, 776018303723256222776793026980427393695114677598119278726798477675531023478, 110680464442257309696, 802154238811009900293736811591253609414063396846943844737787359819442480663, 387381625547900583936, 813171892278281935222023701341708200040149652512308411877721628696594554194, 608742554432415203328, 836638014968874192438653061627181461507065102000238198788427952357698285248, 774763251095801167872, 843862395968008201601775448088531292447953061476140527440387456538782584794, 959230691832896684032, 855854647761162468855886044400105962728023895356899067844245231316026186180, 387381625547900583936, 875470120220037648359206439407140676983229848858749540447605330658467957235, 2, 669230586859958490741249662966326572567218133699900341173694810836452909813, 78511461919810920229, 1780635706688101162492333752385582212132586413037185593542575640390482278848, 1705836946, 876213189827322367662332475233982938717881043598466923710362169048566405804, 1789334175149826506752, 899144459635183207347452052830854867135029862818347126727948766236955918993, 73786976294838206464, 902492192278866739529390795567852665941148840926620678225438377550865106375, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 83236578965738793730, 573626898100370092484029577799205407210558772901379288068197999563714079081, 281869070154536437, 935616569652661104146407484971841018934559057389370669079606327445216497066, 1125251388496282648576, 936088186618777417754313740133870618797009292501537357874681078107928740132, 313594649253062377472, 948913397239595136471476925481431015587636220568011354823995853353723195967, 424275113695319687168, 982183469523218101090635767776565085082844310959174139090561876901344513055, 166020696663385964544, 1023276562358895258488104616850067400698612437360623076511907925362303834122, 110680464442257309696, 1042016667305613029107878436270094335889092422359305385758798346531695768456, 17303045941139559415808, 1044113046369861117683568820308144310034632757750308561968550706911017297367, 8983564363896551636992, 1102321143906377642221940802407969287065792110721058564586422246702494930278, 1, 1936723832280752892278182725096591492307819629729979526118878489144247835830, 1, 1119969919809545854081833443884737931739078659593823222550367177457902660513, 295147905179352825856, 1123566777576609866280205471114376785172223128089873980481211244277522218264, 479615345916448342016, 1125861341867506879365269840842080417087083754285009384055482911702874621580, 479615345916448342016, 1134978223996130683529216629716678543232533190609502274517394700666304921728, 1291272085159668613120, 1167783250973958597288702098925132439672556254292896224367446424247225353852, 830103483316929822720, 1196401135886579972093459570600261596754581528475657866552535364475131034273, 1069911156275153993728, 1198112959033484569824638591048352455130111114670521317465536014101535842066, 2490310449950789468160, 1204373478652746137501502844036425670385157447907258253925134402743305424651, 1051464412201444442112, 1219740847247685148594147705884090851571395975886708255143734973402444917916, 498062089990157893632, 1232107565569422339433629800803533762046901802592931592166652101178470226904, 2176715800697727090688, 1282453078319176928421920548290590909145618584561356998492989541867370893117, 1125251388496282648576, 1292142752029495683148768160180299272416077397396340518155612081504097012004, 1088357900348863545344, 1308798006506268955151834682693363603808792815106216504637459300510212349669, 1494186269970473680896, 1310993521055354007706671299970149614767477362292208760607262718877906170009, 1033017668127734890496, 1312291292822940614876724479062121827256132624601637924990293176522906178441, 1641760222560150093824, 1323914402458492160578791984624566560934181882534242777736509415300289531628, 1069911156275153993728, 1342727418203030215183855984170177590043926088814312872496884324646159594433, 442721857769029238784, 1347276433656532483874495047867571952502497939089697675058117640955367180806, 664082786653543858176, 1349719028833807234870429358567491612721338589810728665677885617409345811247, 1291272085159668613120, 1444882337220425783500155850704556997129246037008232852434077496547546011078, 571849066284996100096, 1447384494564510008565656452670113904877959434680082348124805752358953639427, 221360928884514619392, 1528884612111781874014915417757377093835852851109267599079790360268761575091, 1346612317380797267968, 1549962963167503315225438906243708902738356046966426514039951360410302127758, 1014570924054025338880, 1568538064569296151120717337874994342269033619163918827596131911140466613315, 5, 211338730133977518247259398313147260771726654269258349596464889962077887387, 9, 391769992294678742610809942163871749415527267298015011331869555526260376708, 1, 1116129578576352862874140655513814666671139567000384411186951816972778492635, 2665539445372719728076796131684511570827087708552277034060962765416200078515, 1153890585900983514195361093465921384944077530408696601227043108334476773990, 0, 1954754439514227457246368415932156190461785401273904875339989372047731661893, 2563437159341973875062750342472681031539056022278569494221966817054630987726, 1587469748440082973843821329733353017865845314663775391633418223636331314545, 110680464442257309696, 1623405300569052686685711659018598858874557114357804356204412070353749618846, 1291272085159668613120, 1632733962355793218772456680605743841962849730955349462471903606261091689237, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 10426264655427018789582, 860370950108688216340004790080337058268427944294306403669698046952904826247, 1484058519865749108768, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 3583759, 1638619155565041610857399139362729376339662778146052139161461013203130677701, 811656739243220271104, 1643259635762822448459660201834866900626400807431107152255815709746067589674, 22027072630975838489149440, 1690805330801826884870139470895605109883285830696644461280348341904843143637, 1826227663297245609984, 1697355990121111166777465396393357065252663828160326887116167025433058052637, 608742554432415203328, 1702029464965173098245126384223036227253398570892479246410407804368515450159, 2010695104034341126144, 1714207849669826225059425382269095673737063231825272519282858252483581516637, 645636042579834306560, 1739910649162017475754345946187884621976885237156761595006290012111534528146, 2029141848108050677760, 1748947202597727938703015949438615928762929855257454795355225170425599402436, 258254417031933722624, 1775374530936347183500396184473383875772457355339703831232303568666280330315, 1881567895518374264832, 1802562850212152000453082756130406299469221575242056534158056819685320587263, 239807672958224171008, 1806018566677800621296032626439935115720767031724401394291089442012247156652, 9, 217996558785909586482220337924819613169034881710051598700962049102359647406, 131, 585205623185273036175010917179074623132577709196335840296462050270615247391, 27317703, 678231065463940108367835060002421312962694149528031782301808099480428385625, 5176, 1222320345634912353007797063090892445166534244424516685796698543961621401118, 98381, 1252361209488381078130823745385932633217144675582073178159078572150239762336, 0, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 662342247, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 400595, 2126815845291597676359121183855666827727811102417294973219698939708725919277, 3583759, 3083824321948631075466298535711927098906868100429633131999073022719725972271, 264718, 1839768119980057694258118152173270264017363032749363151525165483829672826219, 1604866734412730990592, 1841042599129468503783653999687169526165462856659256808869064821565672352082, 1567973246265311887360, 1842428944423568930918604995572518185834331702275662191766002020773432332685, 774763251095801167872, 1848358611661238745723422485338018010252701216145912623908007029277536563370, 1051464412201444442112, 1886212889629631188189497155848883534738756148921111726686756987927630157522, 11, 47047664931493741353878383063363983492168618060336160379642196593060492725, 1501265826565488174, 702287404589959990801083050394306185826492075933202130858552339128365867033, 44945626511211621, 1155362581252160404047469021696881340171863965066307450542701057520112011364, 48321257951459214, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 137086614035470448446, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 85430036939993083, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 147973452563760827332, 2085292531393347309615598767615303942174445255621491236558237665818850914814, 2256857551676557, 2957275196844484707554490207229201118888866330027367182142348450075163741754, 4457874341269322, 3544257892618944963934280631597823681661062464163819671033263884430479121124, 1731100200061268, 3604387185007053211110931256002031041098472481258667562270447593338618968365, 39069458566596537534, 3612608647281413344897288274159883918678188954120470565007114358785831469318, 0, 1891355157982002514298079820899272574547179202473278882598901651671092702594, 7, 825633409898063892752467600239748611523024962551324712140735056975596551978, 24943007576804635020, 1074334625158217292405601151345483245777778182658092053052573348703071572143, 3064936889797930540380925195504130563511490839695748398037357524168983213884, 1079213035913931897056332105495109524451856058442083615283114591834346453995, 52145, 1118589278504530853959995583790154076799072100994981564551980917580307299176, 7, 1740166453683969710168396458122542978492195921463421127347978714459680430575, 6, 2393263725293168411243242751575634854622857152515969348329260315573356366337, 24943007576804635020, 3203743490217101765125683461609639063565705066070348870626367007775327043504, 52144, 1923256386544730588212198525974858166436806403094881613646189388897100799009, 1475739525896764129280, 1951009556694400994979209754823932255678936630443882379806549971001481572120, 2, 1449143547645090542063072844265667315741990491499711687374710081456680373748, 7380341, 1449143547645090542063072844265667315741990491499711687374710081456680373750, 1705836946, 1959912001187033356862753307378396648217891050127990451920118619815721673657, 1918461383665793368064, 1986887402931970192522607984444281118088988934295874958660264910108402945538, 1217485108864830406656, 2000614860219567262618870985717596361446047527234622048817020324346556962032, 1, 1936723832280752892278182725096591492307819629729979526118878489144247835830, 1, 2002868151252357726946092280893670702879132275654497531654440001196637478763, 7009762748009629614080, 2013675656565223125861334873796554617696393139428842229434543354882351165867, 1383505805528216371200, 2033881127191275690604499015341588120025602445067276206405490658826902864129, 368934881474191032320, 2086403193252856187344106953332549804632278375825549301579262718245538073844, 848550227390639374336, 2087021424722619777119509474943472645767659996348769578120564519014510906823, 162, 771083640874344086535825016699278150573461798891203551032898636331704275, 2553607267786236170102, 47047664931493741353878383063363983492168618060336160379642196593060492725, 1726571840222804588, 64725145718498550461185144396654186242378850906777216675160682012306457192, 1246843582208048, 86817727059109857068304153176966545182587494127902674864538394754549160426, 3913964355081894, 94462375994981440095266572341677893017482176799772284461706588051356694916, 9395043640176786, 94661086477547594051226668971539627668743347719831892496543949538655556171, 20596942920562670, 100344824065019803403768551040201079180370963606719901550164692924739493662, 7013591986024040, 134570187319714560575938922447520250263643781954522363775407526424189797818, 2461206527358168, 149452760701551335582268829462443752623228885504046282793972741434454213040, 10370686190865319, 189696656018200000615831886600969904905751040682380237996534757448146690180, 14314628242280904, 217996558785909586482220337924819613169034881710051598700962049102359647406, 878954578635864, 233218346478389150450618450083139242789388611813169640967143118211477438084, 93270610775903, 236409196687647972693857271982576338445811604239060919812951297160465556767, 18759990452654646, 271872855184553625489161195235064147442884226700210707679716173267918618614, 211914663934147297, 271928847675340195878684741144678454828632305425548718928476374077810498034, 1720401232290543, 296756307531492415112930941193690510019026653889765280397938186729523155519, 3884339796931379, 301732655925228424505964129523353952161642889320763557293534893643691558221, 67573787499268139, 307402346173840034727346431994297649525774262493514344191810019157712460714, 442040951178710484, 311639876004514212070450013457449983864411173703676738680622681459894506684, 57574762177980763, 313911095047050622863632324953557705134350681292384309488208243609161889587, 2952613253930432, 321812456257919000941918512336924899603704356619578204904989792948629898743, 1591549175908709, 332676879986127520683554398577891701803230847231659286394021303360878179630, 118024697963488, 354089607163205178768266022658746926956832240732286841958179895421062396154, 1630545140892931, 376534570847942207092225741015013184852119763047461129632479673550902223634, 20931278517114965, 402203818018003161230395989487321866767371283189591635162574585819009405729, 147384127691339616683, 418501566425035675809667235707596560320809188401195895811879710749282202744, 19090344602372562, 429524176424720640203139488906106364693550162146520452670061401255472381070, 3290072001694828, 434052512213725114830310545324469845604096734474019100692830557080332823178, 2558542230787061, 443782795643431720025468932108174053101797954599056910626524270018269733533, 25719686529249522, 448922187494388929360830055901950329442541067710373578997189785863373134886, 1133747041288635562, 475937640095282554567783978842539408178990237092421403377977995353907574525, 3599275240925704, 477739387559832265241027190798176272980242435411250765045387175076361358985, 74557234773835912855, 534212263234666682708589591805671080435123147887100487863664568890692791397, 7932848654861259, 535333120320541827511587987667690409227408108489497292474507750628261493814, 286568208744472, 572616894771041420326582144801124181571448491627201952275628682384261404606, 1538672889689491, 579674968263833158302657740842583841249750272109288261753036522801826539740, 9179067417082367, 580707164909945652104356228188612168577695149628772229548515418936487221404, 8282744757194734, 585205623185273036175010917179074623132577709196335840296462050270615247391, 262650630779030755524, 622648794900961609577156965521574520126474276130283973807168793347529230559, 7792366762038206591, 641460630734845047128290458960260871994184364633451714830567269807942347406, 517686028258754, 657284884877457473077923141609381623772194639501719845541275129566834565026, 4140113048763290, 689903550733257169685627941032613445984563134131277490425827780298722881826, 1573605727112034, 694571879726671746234657381939323508925368391598523728029702692571725971709, 109961143106131079, 695351910421424813982562172529065663775033187754478252884653343733520348517, 4382086576314339, 711792861573643058688180999195407454265848416162812109536299547346098256999, 7480368234438902, 730348764613147454596024190838872547863669679319749524399108006593146005849, 1501133400335550, 792985955619778553349299217630311706976597674370358120354024088100275525617, 616571623511805723374, 806663488775416619062021443492440144390551316772307311214701505099695938389, 23447515338821337, 807954316462585766997252855785731637471111449795001925880226866057619136871, 27192617207310522, 882909419221068787912260915932276345232571491238760939183843386020399299932, 996538916891776, 930616392440279689095754377940356699646460930365650881688716732199542274640, 19272039502854391, 953458885787918404571956200640028727642735241956930372415558768241830024325, 4209700137394349105506, 954395232827588935818690570522743003016192678499431608476745975110630040429, 2389055834017485, 966063772260179744223324834447041235079321603522434492456808033206448198591, 6233880062156742, 976684738942141106240987593365344153183517409648638207504179773864348652965, 45990221220475029, 1008687487830063519563330748589158890489929270015424575928828281949643281993, 339908200373647, 1011845431677563899323148771565051583916583396083358295965563364227416388193, 3778345396986407, 1029198605516082064545244089806045793277855069935456350299501894757913097265, 2826410673121575, 1045868770740228316326809837156289601314652478562508959397837705334557191567, 921565362818315, 1065276638679357799986095402550805183646674544856551215255417578568651843045, 34003840880548, 1077218934403725768704926647879752367730470791707855680004545646129642298133, 14510097292663727, 1096499190942923730892297128526393015998378916697832471667636266885201942959, 20621537249665671, 1136707923551997996026598692287090514696867736941999980222885392036052694602, 280396823870368, 1148005865941443683898919714693049662396570218100632227820385421988934659356, 1811274774036823, 1160984579962091991812130526352203206648725512099924153757895507552467039050, 1909467584276620, 1171248776269250304201654487024794714034070711449593230835926873772311591547, 1000000000000000, 1177527387670531832951581180703016447393541192173147664865430839152390878939, 28723326631067845, 1208801280346351324626648077919031701664255681724753034544196157805673537500, 910618399147514934, 1210499907068073906661316988524557667345040318268557437528956124267603216771, 1000000000000000, 1252361209488381078130823745385932633217144675582073178159078572150239762336, 2831310066854720, 1278587423099355764197221792272361861125147963983586058525873305408030248664, 724046271838539, 1286233656452259544462260820514317546418132587681156081433334841041630755646, 2549753461271106, 1293609967585969622655507180318059231466196664172511978483049607170574765252, 588209084771129, 1295154667639639452298693559485497498611592023144515124414563775320119184882, 599249054637313, 1331245567401258276335825264541261750826716365480821012814520740835723221691, 1091334136535283, 1333539443610975242362021870886222909836257930600897146115736962675480534534, 5479928660440663, 1379139583025707911995069924887412215104711773147988283323475768525565672844, 1663001428083439, 1414468009721941701002419881401060693894190714888035182952721321497788988593, 5564412275387382, 1415620715147329433701869971734143326501358448527638653188514705281648201373, 1560505259027407, 1469179282176910921226813356607062792742585988368921982532087803031014648184, 521827220121701898, 1478320352090909103164796707836109902087575326819281867470644522947654135159, 3712841040226820, 1484240913541885536922323387936658937413959880758966268961401869274047164664, 599108159770975, 1498582521459519259507684886669706897363412289369047192232373004923709166638, 29931097502858492, 1531860555247625200260879120288394582543282684212963550066425211720537594371, 351892183711203, 1551295464932725588329544881955942548326391922317197183991608023295022187629, 81294451634792405819, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 1975895966214185323978, 1592050824476661000633614683465079537023183088899296928365668557880394573604, 13134247489071111624, 1607865437984290962440510866741788653690938325948736859732969371375727822462, 49848223619056858413, 1613533197876647419983485962673172059896926762657086343400539218276985001262, 3407104300829683, 1647278322410319859962660447841155275319836368853676104878932015024363948246, 874901284807271222, 1676897727058574213773444622408040588298796017896303036647580965839047041815, 1557585677946580022, 1681339151888769016894578590386648254058044480169843162488349237604327891561, 9137529121183570, 1685336325041261170672448854817901351051946539366142944325526645291355324109, 5749892631168857, 1721223146832380984223921227786999916139628434576134041205103059231948875560, 2398992897622863, 1726638549631814607772542181691260550689387264550765821952512000686038393848, 5257860084282448, 1799118236878537251324450055169762679540531920696821029211077033275603453304, 3660913005747787, 1832738925239236088507148327281869184336602578744109751587997895555691139623, 14892461872416782, 1833660278847673064596397133389631616924073029427121846812008034886957009874, 13431767989468987, 1879850026011177951806735861994211705599753489811977753466237534719561622716, 4469721920465512, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 1320782709313322723762, 1930121263652246622976803149604837374542394312471400156676431712802856221968, 2063839005427019, 1935904323414401253580411706720239532439647947650630248532792508940139639781, 11980773600813235, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 2010003568555823535, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 584358467366157846438, 2085292531393347309615598767615303942174445255621491236558237665818850914814, 11045650588326874, 2109895075998154347912734724214053662672952430586634509994236792015799104546, 360214230897822791156, 2177489490568215961600357793306348302127263064538326429323447922390200578469, 4867319879931215, 2184909421091233404053110586485661703925565060417538096426789374508525056435, 9253838030210047, 2201040513574985835610648922361370429739003532279247646966312240754067493438, 973592539305859334422781890443, 2210292622611270130135065370984069157977995246912379435486765410702339839753, 344810407140832, 2228816192041103105307469337864941713718298147875933503160569591554606442117, 70053467174264168816, 2231119801438030504752082497018646970052646144259125129625730892241813743353, 18497680247606296, 2275781046171480678947635824316685032657732269306468529963169544999843455088, 1167772812454895856, 2307560425202652301784593237758920482748956156812136947198096047889560544316, 196248846162886359, 2373098915805775436159006947464157985911639350504665126031667600979600846775, 64769045218741250, 2391257774930840040377368641019581761981250012793463501307151573516264315546, 181944640169045160969, 2458509211881125537739544422058636366922954876722406638893758015216672653516, 3700000000000000, 2487017767330857618306691117582847159978068209411146042919784898850675155967, 12879926730359551, 2498751704529839326025332805736940584579638213992871227992871096044482283551, 3718507424765793, 2498956875606559677681632717755667619051838178799269424041148751786379379155, 1432115476858120, 2555977626632924644838797271891399750631739344299323312556570538271571095513, 942125593981052, 2560890407601873325167733305517452731433999941475950040445635868372042953714, 19246907861424565, 2581499660472819578075884141374375803771480493720423825567961270217434751658, 10907685988341471, 2584354606819440211888602172377573387969327826264779248785873015028836763015, 87965221983274181, 2658159801619093976454031930311924289699576397169091349718269015175866487666, 4599220354931550, 2697615273643521185552606145901781597567122225049141122734872597801320913146, 12626194912583073943, 2759375215044590609893574960769738269508284527280146285588018450044352077767, 19922036937544932, 2798199857577316170110253532984729606730351609578745447788256644819525856724, 5827726268678580, 2814877519781027629798785541289672262124581011752712870057485375801653379725, 26588752657120528, 2838294622830055079765403075487653252015435445568990398714993470100241868602, 11539802863377004, 2879639891509272448001689937488816126997679086341576100282500057723439320204, 1456240148302880, 2883275350933347007033191679093101238650892982130303574561525045661850516311, 3863230261470186, 2935749656592265472604517143307190929221549753469566746661959644254857025057, 4279093880215782, 2957275196844484707554490207229201118888866330027367182142348450075163741754, 13505556615712935, 2970665336275833829169438428987162794471102753583259648182049239387236095329, 854260310951963858, 2971489813093028331522025729541249598418758945516195431129972787801936772585, 27090484888060442, 2974681923512070418114503805494264992760941824656539741039086235159484405465, 1851210509552942, 3023770623670977388820052474669395250668677603488363084909550102626041536596, 18612468249787567, 3083824321948631075466298535711927098906868100429633131999073022719725972271, 32268796579440453, 3090746259579715917854789216601435403172378260448015724210730371691672603177, 5876876882198748, 3169386663703057396631807406399722624671473418906112272309299143586768481688, 6737283773326695, 3256805281691647758598410348062905327524805259284824411810269504896785907785, 3660677516477233875, 3259726758814328145107200589019026079570144520347422917907029713163872675923, 2850474446844470, 3266658774045918108600347780857639101644370918571539562513743370967708352007, 9118502130390428965, 3271689790668779729318412990443862779783518378980934798555472085620611529302, 5780199124424149, 3272317329732134845864449712756299717609351065962514749971666820819256400200, 132441079432116565, 3329239121185529797147582420914305797285731591268454037861781243462747712442, 3442940709728277, 3332720507649736219342860485654064555440372524291923750765540985040473798354, 15801498776278428, 3341509269849746473018221926604251939687503824534240202400075330720443572827, 9771112111170465, 3363324372224755725895559455709575395593431797195603797540654043521736048530, 4201974582487803131, 3364330484730344498770431067732683138086299477625868117078302366174241338111, 2149232381506936, 3382314819256663958991362528923322277347046603423507703274629007131700440900, 595865622146316, 3384297516693601116383684441964460250381759947785136257085867104492915308516, 1888169034149422, 3456348782602265625082192574395467619717048530511384482245950934457172839285, 435449274421796, 3485438802814389778365369924965845105423230079735961423612787040250347980042, 26244945358562445, 3516902830370881488915966416057865201099016581449039077147857945634701387772, 1620400017567310, 3520260653241198350194321313220273941333343706644332005334018517069661496420, 21164615428026936, 3543636529419965320931894472297667097410061034784450633047295704706157951518, 7545707053701121, 3544257892618944963934280631597823681661062464163819671033263884430479121124, 3669582619634947, 3550031308084037652675507176625866547780751688256106579143427284322336210897, 43438215221577856, 3604387185007053211110931256002031041098472481258667562270447593338618968365, 44875854291024159970, 3612608647281413344897288274159883918678188954120470565007114358785831469318, 3055640930967162, 2088677686097928875894293205913525230368969124675703826473239327227187425384, 1162144876643701751808, 2149625499377050772775701191274921578103398273298955620360611655307104287237, 14, 148211877100952625216385460614752995000340098827494975241544690719460486386, 260, 1341178610788071237138544507054690838957736706325968753268510407348712200455, 73, 1531876656774021380839502982561428591753499766287464078021099472898351972065, 16, 1789340305022514556868961069266240009084182093271297189466242695057487573046, 1705836946, 1789340305022514556868961069266240009084182093271297189466242695057487573047, 1001706285935440061712175567, 1789340305022514556868961069266240009084182093271297189466242695057487573048, 1012651406114888831165862283, 1789340305022514556868961069266240009084182093271297189466242695057487573049, 4161379160182593102040421, 1789340305022514556868961069266240009084182093271297189466242695057487573050, 22631167508365620473070851, 2060004538396169651313621397383418198310978326934093217159479066329091952950, 1705836946, 2060004538396169651313621397383418198310978326934093217159479066329091952951, 1022543955586347704254486774, 2060004538396169651313621397383418198310978326934093217159479066329091952952, 1032471920256682536710408150, 2060004538396169651313621397383418198310978326934093217159479066329091952953, 27496695938767299836932090, 2060004538396169651313621397383418198310978326934093217159479066329091952954, 34958194676732441888018927, 3370653300634288448421197836663871305543691749272476158720126432396496465970, 265, 2174638511841737981141519476379213046554268517094967496121318408370098406833, 2, 1449143547645090542063072844265667315741990491499711687374710081456680373746, 2963869039555350, 1449143547645090542063072844265667315741990491499711687374710081456680373750, 1705836946, 2177149292491018417715774000056994188369467207221503622945886811766623165290, 6, 155082539558689579094930820457537605560250202889383976768599028600060638458, 21180032198630469, 482148859801725464274198147480840119334382080162606228723774290742111978842, 22017868827318799, 807954316462585766997252855785731637471111449795001925880226866057619136871, 0, 860370950108688216340004790080337058268427944294306403669698046952904826247, 616571623511805723374, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 1524317305446, 2192185015552815667795098006747700517719605501427252033035433606745772754846, 1, 561493993970391440877586028353611886036044512964098095038509989605157412345, 340282366920938463463374607431768211456, 2195456044386502777178745531788064473597730482897253468796135195700172089950, 608742554432415203328, 2355661606372764765870758119079016777149137859135882336761925995499053118533, 340282366920938464441052043338374447105, 747754797100332948667821850294777448537830572225381519032197321912236318723, 440168123437330633874675177419976431975019168943402176995739208264668116428, 0, 2368576823837625528275935341135881659748932889268308403712618244410713532584, 48, 86817727059109857068304153176966545182587494127902674864538394754549160426, 54, 149452760701551335582268829462443752623228885504046282793972741434454213040, 50, 307402346173840034727346431994297649525774262493514344191810019157712460714, 1125508198, 313911095047050622863632324953557705134350681292384309488208243609161889587, 0, 354089607163205178768266022658746926956832240732286841958179895421062396154, 0, 429524176424720640203139488906106364693550162146520452670061401255472381070, 6465, 475937640095282554567783978842539408178990237092421403377977995353907574525, 8680, 477739387559832265241027190798176272980242435411250765045387175076361358985, 183603552601, 579674968263833158302657740842583841249750272109288261753036522801826539740, 1462568, 585205623185273036175010917179074623132577709196335840296462050270615247391, 509595381200, 689903550733257169685627941032613445984563134131277490425827780298722881826, 6341452, 711792861573643058688180999195407454265848416162812109536299547346098256999, 0, 730348764613147454596024190838872547863669679319749524399108006593146005849, 0, 792985955619778553349299217630311706976597674370358120354024088100275525617, 1524317305446, 806663488775416619062021443492440144390551316772307311214701505099695938389, 1971866, 807954316462585766997252855785731637471111449795001925880226866057619136871, 25523578, 954395232827588935818690570522743003016192678499431608476745975110630040429, 32459363, 1011845431677563899323148771565051583916583396083358295965563364227416388193, 4098, 1045868770740228316326809837156289601314652478562508959397837705334557191567, 0, 1222320345634912353007797063090892445166534244424516685796698543961621401118, 1567307843, 1286233656452259544462260820514317546418132587681156081433334841041630755646, 677356, 1344688852607164181486492384212745117486585550657916410928008085422531303852, 298012833389, 1346446300952445496278220074988990778620090302385772101910063841818303861150, 3058443723, 1415620715147329433701869971734143326501358448527638653188514705281648201373, 0, 1531860555247625200260879120288394582543282684212963550066425211720537594371, 10807723, 1726638549631814607772542181691260550689387264550765821952512000686038393848, 16410038, 1833660278847673064596397133389631616924073029427121846812008034886957009874, 1056309, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 3391721731787, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 5625276452, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 835492433720, 2109895075998154347912734724214053662672952430586634509994236792015799104546, 890747529808, 2177489490568215961600357793306348302127263064538326429323447922390200578469, 12332361, 2184909421091233404053110586485661703925565060417538096426789374508525056435, 63148630, 2307560425202652301784593237758920482748956156812136947198096047889560544316, 26116306, 2373098915805775436159006947464157985911639350504665126031667600979600846775, 0, 2581499660472819578075884141374375803771480493720423825567961270217434751658, 0, 2584354606819440211888602172377573387969327826264779248785873015028836763015, 101529800, 2832263366476004100912769230847743514621020388252373536178445103991528967753, 87709747348, 2838294622830055079765403075487653252015435445568990398714993470100241868602, 6011798, 2971489813093028331522025729541249598418758945516195431129972787801936772585, 505483975, 3090746259579715917854789216601435403172378260448015724210730371691672603177, 0, 3259726758814328145107200589019026079570144520347422917907029713163872675923, 44026942, 3271689790668779729318412990443862779783518378980934798555472085620611529302, 11834499, 3324347670910979010094325332024451354588958587675959080680531874831367476431, 225770960442, 3332720507649736219342860485654064555440372524291923750765540985040473798354, 0, 3384297516693601116383684441964460250381759947785136257085867104492915308516, 762659385, 3456348782602265625082192574395467619717048530511384482245950934457172839285, 491861, 3485438802814389778365369924965845105423230079735961423612787040250347980042, 29696013, 2391855390141926402188931803023969197482576403727974830640533611372823518343, 5, 446127535987530822843443754568064058475455177152358443253709926349977944908, 652341157331443732621, 1174987432824581858839632426818705946102296612739133317214367202361599722109, 74557234773835912855, 1174987432824581858839632426818705946102296612739133317214367202361599722111, 183603552601, 1174987432824581858839632426818705946102296612739133317214367202361599722113, 1705836946, 1174987432824581858839632426818705946102296612739133317214367202361599722116, 2107848022876059, 2442301973086051911186326608712374531189637556949356207174794944841104118503, 6, 475765804056441207360671152038120243937309808816934408531190618873724161109, 1705836946, 475765804056441207360671152038120243937309808816934408531190618873724161110, 0, 475765804056441207360671152038120243937309808816934408531190618873724161112, 0, 480300016316118835269877360528005821651954947139641852848750280532586491831, 275102739726027397, 866280574952953673450700534582355235236843470911372507383209824836471034797, 4589682775171447812653056, 2736920393546280753845675329767366618795974985224904637966439453589178918427, 137551369863013698, 2461707722432395661708797885477397117007458536930774680416205805182417362616, 2, 482148859801725464274198147480840119334382080162606228723774290742111978842, 3554154011176681485175, 1469179282176910921226813356607062792742585988368921982532087803031014648184, 9981443510942795, 2484064663248009999014484790199285937897690615676204754891181642638840507188, 258254417031933722624, 2487912913868014004131904966926849406549842942812205187711794077420293443995, 6, 82621402349920967303088532810587907896436585585727051646519264173258146623, 15082858, 482148859801725464274198147480840119334382080162606228723774290742111978842, 249490974312, 860370950108688216340004790080337058268427944294306403669698046952904826247, 298012833389, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 299297434304, 1833660278847673064596397133389631616924073029427121846812008034886957009874, 0, 2534681784017457087083809392510965130335560357182539279475941175006939624703, 5, 386918961764817236287108214349577874309930319273103704100420691745832602120, 1705836946, 758014221171417364361118162078084356608003610083196408368113766612707124778, 1001859098740263497, 1436023221535982289757115934076816918911257223648826818507104343548396451356, 8060036161789385, 1662441835987761786991711945639535246520408167559589718982749543340721955785, 1005930779260094873, 3154843021503698496355874493826627483684847192136306888174943696622126007100, 29925901382116361, 2554773807472822140633198908756555958465844204534224802567041016260732486817, 682529530727253409792, 2558673119177335908364003360299745067862012164657505782227425952737860405090, 811656739243220271104, 2563437159341973875062750342472681031539056022278569494221966817054630987726, 36893488147419103232, 2565422441589876190446664797018204877143680599090226965928262347760092159348, 4, 151387762115355721467134395616930747683663242068602637478301137953786544829, 6, 151387762115355721467134395616930747683663242068602637478301137953786544832, 39354465991986333, 2968955931683777405613636764168133009211913878697116706652630525656871119978, 1198112959033484569824638591048352455130111114670521317465536014101535842066, 2968955931683777405613636764168133009211913878697116706652630525656871119979, 11768465991986333, 2572038606802437469366023512667277946106893376387863742592517080578753987157, 166020696663385964544, 2607617455002420499668523551709452969387700070096721273381165471775055898102, 737869762948382064640, 2650041872375786387356098295345461303918671315832493531436339392722753333679, 5, 390165215966095131772297329663554063605879906197762470373395020841195498986, 1042016667305613029107878436270094335889092422359305385758798346531695768456, 831203272847234135393956543180111180734650220580136988460972161529958261502, 18, 1283767515281698813888804706441850502390600248873005179859582215787395424361, 843862395968008201601775448088531292447953061476140527440387456538782584794, 1905422227182883509023520215020612003254673651913910969117979342374889679838, 12, 3259413982397781014201044504575627806618307577329771170583972481352475301668, 636906482, 2653100106359224560266731565845449343495685222095713772166036020958290676244, 590295810358705651712, 2663434973940601208596578941851536074487849276664922295813578644388631916147, 258254417031933722624, 2666905448870046331361939839230502454704253361173847603066518616813208791114, 2859245331424980500480, 2693390468168800398440770847179967346961414681328992071776133688984026316391, 2, 622648794900961609577156965521574520126474276130283973807168793347529230559, 88458585340184869919879272, 2883275350933347007033191679093101238650892982130303574561525045661850516311, 17797052777673207362399, 2723614570637910654941924916895835605239497627034752054520009779930931938488, 4, 717511783135957835804591424268889957571779054553113058131386695908317410107, 827634, 2179364018452259414816813201521615640028580561716924138309455353013558271237, 713051596836001528496073394359607372326929561379490744347265050695116120062, 3424463328764107708324461315256614753321081855457851115923925179851154616826, 2, 3569118445285959859403446704741235788761443037133087143164462178521836969249, 720921236364732369708807512587554656855046850883224269557133444960710510, 2771443893804943786480977971438044209030822553848438103631115525719172830967, 1512633014044183232512, 2785060784734969603991888914512492169646546963629691674146022984575436831193, 4, 82621402349920967303088532810587907896436585585727051646519264173258146623, 2675797802515, 860370950108688216340004790080337058268427944294306403669698046952904826247, 7792366762038206591, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 88458585340184869919879272, 2862349228487603094625229530105806390929580000096179416514594488754846034932, 1, 3458018541406083032669487933492585355199186017301006127339290004508380893599, 1, 2868217352079545269288458195229105152637172942596344431623124347197964917797, 553402322211286548480, 2904895121254650545456934732012251533814455780625550873885556179970925043115, 1014570924054025338880, 2913428726548929017768813495013442454695068370035169541132680165129502259450, 1272825341085959061504, 2967174050445828070862061291903957281356339325911846264948421066253307482040, 22, 86817727059109857068304153176966545182587494127902674864538394754549160426, 198068231, 429524176424720640203139488906106364693550162146520452670061401255472381070, 190637463, 475937640095282554567783978842539408178990237092421403377977995353907574525, 193109853, 1011845431677563899323148771565051583916583396083358295965563364227416388193, 198064410, 1344688852607164181486492384212745117486585550657916410928008085422531303852, 299297434304, 1557004084459112997824749542614895278421960010079122453994546383358924652269, 84717434476, 1726638549631814607772542181691260550689387264550765821952512000686038393848, 47241107, 1833660278847673064596397133389631616924073029427121846812008034886957009874, 1060944, 1919009528300487416898558168639787817852314761514939568475739027942176236393, 1278989379219, 1930121263652246622976803149604837374542394312471400156676431712802856221968, 26856744, 2069912081026075203807678298279896756222141755567472685243376726986185287735, 2575820851, 2082332565896149669096986593843450666768575991251296089487018576539152871154, 258600332631, 2373098915805775436159006947464157985911639350504665126031667600979600846775, 2019261797, 2697615273643521185552606145901781597567122225049141122734872597801320913146, 31265084776, 2798199857577316170110253532984729606730351609578745447788256644819525856724, 2963090, 2838294622830055079765403075487653252015435445568990398714993470100241868602, 489877, 2971489813093028331522025729541249598418758945516195431129972787801936772585, 505207892, 3266658774045918108600347780857639101644370918571539562513743370967708352007, 22632757694, 3324347670910979010094325332024451354588958587675959080680531874831367476431, 264578618356, 3397869447943991547177776998860078252304294494618141777219873026721974445572, 171661904, 3520260653241198350194321313220273941333343706644332005334018517069661496420, 21530719, 3550031308084037652675507176625866547780751688256106579143427284322336210897, 0, 2968854930680454313248929009988563441063470444748216618730051332250512187817, 516508834063867445248, 3064936889797930540380925195504130563511490839695748398037357524168983213884, 27817690063154003836928, 3073590445456395411179943783555559610284417955810473598043161808495665068381, 1254378597012249509888, 3156359140669920198523831761912224667033167757982365253653927488505092542901, 1697100454781278748672, 3180702903805271567893882291779466696480597304017819297404616530813744445323, 202914184810805067776, 3188900244365497533175846002250599102630982068304051472391930239378442488950, 4, 82621402349920967303088532810587907896436585585727051646519264173258146623, 17781085, 860370950108688216340004790080337058268427944294306403669698046952904826247, 39069458566596537534, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 44875854291024159970, 3206933236717689845005452676807879664950146462110490814074988690355034786178, 3, 233218346478389150450618450083139242789388611813169640967143118211477438084, 8689405425956, 482148859801725464274198147480840119334382080162606228723774290742111978842, 13071327024125140140, 1331245567401258276335825264541261750826716365480821012814520740835723221691, 272840522817264, 3225585928039497366550713210755722248396988778664989194225547719408814522650, 590295810358705651712, 3237614774235855852139783249236857301909700421260044716636300515882548878830, 590295810358705651712, 3241765292063836411408200837165283697392503091597244450093273072340833387361, 55340232221128654848, 3302153425657674824131319226597171857675175176928090598477507032094308410049, 1217485108864830406656, 3344662365413012717818732637518271827201391817997708353449773951692365623062, 24, 54471373101352116323616132667400362910144114980560260682911436815209949509, 1, 63313792328152618232598270873684002631693234202145076140230111618470864022, 1, 599460519805584690948134451329587236989289841713757031953451851619155274736, 1, 603563022354910014209184509139081457738446684277172586360426632847003649472, 1, 647871121992201006246801375590230273064002657086778809164112935312272522542, 7, 677002438618917329829759426439847683591699324651588412313969832145812970585, 1, 897122638582243713757391363454306663365694590016032444087128976539268089935, 9, 987358413444305880102888705628252039987982276709594476891074642801927514632, 1802562850212152000453082756130406299469221575242056534158056819685320587263, 1047740325616552349673314543432326141547307858887918972993141800846059773240, 5, 1149316197300581420269699585839871680262099487074394079582431436016132757258, 1, 1322973155359539628207347122543739958215581295150397887342115955562064220310, 6, 1552895690115622521991953742005826691938911156247595057548399937405025693035, 1739910649162017475754345946187884621976885237156761595006290012111534528146, 1632433490592315438067687938651903201130846162588730090912226630623075493358, 92613767436713387596572723824913205567041778625633165937229649646076982379, 1748774207125674316995480688641171332817633641544566237468640071525666054367, 2013675656565223125861334873796554617696393139428842229434543354882351165867, 1792447587157683625398851697018260196413030283220379841210955894685106312911, 1, 1911058484222077911706421358334787735436350990451053072119865451085768825261, 1, 2003422837023203788505067246712178417150794885790828595655608653100041816807, 12, 2657845989675152133496414253084829968828722390400163805906754293565388466183, 3475543918263274283720520067713574883555357139732844846208720215677969087026, 2739515344053190690091131666429164702937734553418735493820449643437225114191, 1310993521055354007706671299970149614767477362292208760607262718877906170009, 2918518896105300368246656916287178171293846502069342378385221899954347851464, 10, 3208331993906709357602993622791618749655911113810181104961801853797834592174, 1, 3377037800099839023161827441625276935925399993403819760499838154079531163654, 1282453078319176928421920548290590909145618584561356998492989541867370893117, 3448286366457440072804025844302476459148225971549970559698737431115852066014, 1, 3544124403797765134252119796461162500592029407730669138829004455383036275196, 2771443893804943786480977971438044209030822553848438103631115525719172830967, 3345880174394619473454099587259304312778522630072874309352953196695030634892, 313594649253062377472, 3415053401651065310982129951588286571350908818688870929958996320679193102751, 1069911156275153993728, 3475543918263274283720520067713574883555357139732844846208720215677969087026, 959230691832896684032, 3479298894020571800569644777810033149263169880754763990826197694955460702609, 1051464412201444442112, 3483472776507015561285986536838325939219926145935612105002447628545704826352, 5621220981349290535288832, 3484301535110839337435909654159910607993392998978331691224686180930410188012, 4, 155082539558689579094930820457537605560250202889383976768599028600060638458, 5838351054199633, 860370950108688216340004790080337058268427944294306403669698046952904826247, 442040951178710484, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 1125508198, 3488796095165551003812490975976509991633322013578458084167226256699277019952, 5, 1204924672323742639977784086162820172392729600738423511995094141631922710158, 350722, 1583246646872802976948154711300939668425309587290552867627752278223492557464, 3345880174394619473454099587259304312778522630072874309352953196695030634892, 2915416404763302276528364572144034377536731535938787578453047202152544103292, 2, 2948492613409517436895337037007469839181043812638352887039463286571242441195, 0, 3521589605305292833628408465716578429818102114950496030848201019294958752867, 0, 3494863669856678386326517647870165164829265054054537143278897619497445027245, 1678653710707569197056, 3503110205226137190793167069630078098635149346007868756448077675821180906479, 387381625547900583936, 3505647260483519686659169843765397478610223860726730350516465700234034944539, 1051464412201444442112, 3529741969064621541862447348526994612777205989220429642148963487965791672091, 4685472994722226110464, 3531573890894924400865460246450296108386933607128947513796992875108120052684, 5, 446127535987530822843443754568064058475455177152358443253709926349977944908, 29214970461031658, 1174987432824581858839632426818705946102296612739133317214367202361599722109, 225770960442, 1174987432824581858839632426818705946102296612739133317214367202361599722111, 264578618356, 1174987432824581858839632426818705946102296612739133317214367202361599722113, 1705836946, 1174987432824581858839632426818705946102296612739133317214367202361599722114, 997175, 3535999247007099408993018001733215205389553596000966448792663223644602300607, 1, 2703256605021242455743639550079575349144620146251382713945296818426231075365, 1, 3553581664478430628265990977906858922498824910245807313437068530152537249535, 1088357900348863545344, 3561735393686549286638514422447225516469476470401651526619489653236733566814, 258254417031933722624, 3566610155365147154324739583776814726866268750579802300410398109296673304888, 6, 155082539558689579094930820457537605560250202889383976768599028600060638458, 64432447851, 482148859801725464274198147480840119334382080162606228723774290742111978842, 2837111359224837236100, 534212263234666682708589591805671080435123147887100487863664568890692791397, 0, 860370950108688216340004790080337058268427944294306403669698046952904826247, 201800935046253565354709, 1450773348621475531073306325960351147940191236122574546481360435247650274113, 1705836946, 1674354004849578474235843626904129035243166212275069178680248604364187730817, 81294451634792405819, 3567431353666540962496420397096514607935946585817650509668506671186236977041, 1143698132569992200192, 3582241677260449834172798212791679175621567504761815998554810241037616203613, 1457292781823054577664, 3601933104328635598816288871868523421438244029972420229349876812093730455563, 922337203685477580800, 0], z=201377225131740867911167662437763764070039562559264736211712010173075912294, alpha=1982618640690397785888461587315536932244108350854462813682485851697602830289, prime=3618502788666131213697322783095070105623107215331596699973092056135872020481 ) => ( factHash=8317CA028896B01725CB9AD6BB3D4AB2100A5208E5C6E77DC389AC451CB6B69D, memoryHash=49919059170112521859426307131580143744985211963000730131425805673309365460814, prod=552913045675434751078547045895083600649930684704288439160345785510915300714 )
registerContinuousMemoryPage[MemoryPageFactRegistry (ln:233)]
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "IQueryableFactRegistry.sol";
contract FactRegistry is IQueryableFactRegistry {
    // Mapping: fact hash -> true.
    mapping(bytes32 => bool) private verifiedFact;
    // Indicates whether the Fact Registry has at least one fact registered.
    bool anyFactRegistered = false;
    /*
      Checks if a fact has been verified.
    */
    function isValid(bytes32 fact) external view override returns (bool) {
        return _factCheck(fact);
    }
    /*
      This is an internal method to check if the fact is already registered.
      In current implementation of FactRegistry it's identical to isValid().
      But the check is against the local fact registry,
      So for a derived referral fact registry, it's not the same.
    */
    function _factCheck(bytes32 fact) internal view returns (bool) {
        return verifiedFact[fact];
    }
    function registerFact(bytes32 factHash) internal {
        // This function stores the fact hash in the mapping.
        verifiedFact[factHash] = true;
        // Mark first time off.
        if (!anyFactRegistered) {
            anyFactRegistered = true;
        }
    }
    /*
      Indicates whether at least one fact was registered.
    */
    function hasRegisteredFact() external view override returns (bool) {
        return anyFactRegistered;
    }
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
/*
  The Fact Registry design pattern is a way to separate cryptographic verification from the
  business logic of the contract flow.
  A fact registry holds a hash table of verified "facts" which are represented by a hash of claims
  that the registry hash check and found valid. This table may be queried by accessing the
  isValid() function of the registry with a given hash.
  In addition, each fact registry exposes a registry specific function for submitting new claims
  together with their proofs. The information submitted varies from one registry to the other
  depending of the type of fact requiring verification.
  For further reading on the Fact Registry design pattern see this
  `StarkWare blog post <https://medium.com/starkware/the-fact-registry-a64aafb598b6>`_.
*/
interface IFactRegistry {
    /*
      Returns true if the given fact was previously registered in the contract.
    */
    function isValid(bytes32 fact) external view returns (bool);
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "IFactRegistry.sol";
/*
  Extends the IFactRegistry interface with a query method that indicates
  whether the fact registry has successfully registered any fact or is still empty of such facts.
*/
interface IQueryableFactRegistry is IFactRegistry {
    /*
      Returns true if at least one fact has been registered.
    */
    function hasRegisteredFact() external view returns (bool);
}
/*
  Copyright 2019-2022 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "FactRegistry.sol";
contract MemoryPageFactRegistryConstants {
    // A page based on a list of pairs (address, value).
    // In this case, memoryHash = hash(address, value, address, value, address, value, ...).
    uint256 internal constant REGULAR_PAGE = 0;
    // A page based on adjacent memory cells, starting from a given address.
    // In this case, memoryHash = hash(value, value, value, ...).
    uint256 internal constant CONTINUOUS_PAGE = 1;
}
/*
  A fact registry for the claim:
    I know n pairs (addr, value) for which the hash of the pairs is memoryHash, and the cumulative
    product: \\prod_i( z - (addr_i + alpha * value_i) ) is prod.
  The exact format of the hash depends on the type of the page
  (see MemoryPageFactRegistryConstants).
  The fact consists of (pageType, prime, n, z, alpha, prod, memoryHash, address).
  Note that address is only available for CONTINUOUS_PAGE, and otherwise it is 0.
*/
contract MemoryPageFactRegistry is FactRegistry, MemoryPageFactRegistryConstants {
    event LogMemoryPageFactRegular(bytes32 factHash, uint256 memoryHash, uint256 prod);
    event LogMemoryPageFactContinuous(bytes32 factHash, uint256 memoryHash, uint256 prod);
    /*
      Registers a fact based of the given memory (address, value) pairs (REGULAR_PAGE).
    */
    function registerRegularMemoryPage(
        uint256[] calldata memoryPairs,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        external
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        // Ensure 'memoryPairs.length' is bounded as a sanity check (the bound is somewhat arbitrary).
        require(memoryPairs.length < 2**20, "Too many memory values.");
        require(memoryPairs.length % 2 == 0, "Size of memoryPairs must be even.");
        require(z < prime, "Invalid value of z.");
        require(alpha < prime, "Invalid value of alpha.");
        (factHash, memoryHash, prod) = computeFactHash(memoryPairs, z, alpha, prime);
        emit LogMemoryPageFactRegular(factHash, memoryHash, prod);
        registerFact(factHash);
    }
    function computeFactHash(
        uint256[] memory memoryPairs,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        private
        pure
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        uint256 memorySize = memoryPairs.length / 2; // NOLINT: divide-before-multiply.
        prod = 1;
        assembly {
            let memoryPtr := add(memoryPairs, 0x20)
            // Each value of memoryPairs is a pair: (address, value).
            let lastPtr := add(memoryPtr, mul(memorySize, 0x40))
            for {
                let ptr := memoryPtr
            } lt(ptr, lastPtr) {
                ptr := add(ptr, 0x40)
            } {
                // Compute address + alpha * value.
                let address_value_lin_comb := addmod(
                    // address=
                    mload(ptr),
                    mulmod(
                        // value=
                        mload(add(ptr, 0x20)),
                        alpha,
                        prime
                    ),
                    prime
                )
                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)
            }
            memoryHash := keccak256(
                memoryPtr,
                mul(
                    // 0x20 * 2.
                    0x40,
                    memorySize
                )
            )
        }
        factHash = keccak256(
            abi.encodePacked(
                REGULAR_PAGE,
                prime,
                memorySize,
                z,
                alpha,
                prod,
                memoryHash,
                uint256(0)
            )
        );
    }
    /*
      Registers a fact based on the given values, assuming continuous addresses.
      values should be [value at startAddr, value at (startAddr + 1), ...].
    */
    function registerContinuousMemoryPage(
        // NOLINT: external-function.
        uint256 startAddr,
        uint256[] memory values,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        public
        returns (
            bytes32 factHash,
            uint256 memoryHash,
            uint256 prod
        )
    {
        require(values.length < 2**20, "Too many memory values.");
        require(prime < 2**254, "prime is too big for the optimizations in this function.");
        require(z < prime, "Invalid value of z.");
        require(alpha < prime, "Invalid value of alpha.");
        // Ensure 'startAddr' less then prime and bounded as a sanity check (the bound is somewhat arbitrary).
        require((startAddr < prime) && (startAddr < 2**64), "Invalid value of startAddr.");
        uint256 nValues = values.length;
        assembly {
            // Initialize prod to 1.
            prod := 1
            // Initialize valuesPtr to point to the first value in the array.
            let valuesPtr := add(values, 0x20)
            let minus_z := mod(sub(prime, z), prime)
            // Start by processing full batches of 8 cells, addr represents the last address in each
            // batch.
            let addr := add(startAddr, 7)
            let lastAddr := add(startAddr, nValues)
            for {
            } lt(addr, lastAddr) {
                addr := add(addr, 8)
            } {
                // Compute the product of (lin_comb - z) instead of (z - lin_comb), since we're
                // doing an even number of iterations, the result is the same.
                prod := mulmod(
                    prod,
                    mulmod(
                        add(add(sub(addr, 7), mulmod(mload(valuesPtr), alpha, prime)), minus_z),
                        add(
                            add(sub(addr, 6), mulmod(mload(add(valuesPtr, 0x20)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 5), mulmod(mload(add(valuesPtr, 0x40)), alpha, prime)),
                            minus_z
                        ),
                        add(
                            add(sub(addr, 4), mulmod(mload(add(valuesPtr, 0x60)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 3), mulmod(mload(add(valuesPtr, 0x80)), alpha, prime)),
                            minus_z
                        ),
                        add(
                            add(sub(addr, 2), mulmod(mload(add(valuesPtr, 0xa0)), alpha, prime)),
                            minus_z
                        ),
                        prime
                    ),
                    prime
                )
                prod := mulmod(
                    prod,
                    mulmod(
                        add(
                            add(sub(addr, 1), mulmod(mload(add(valuesPtr, 0xc0)), alpha, prime)),
                            minus_z
                        ),
                        add(add(addr, mulmod(mload(add(valuesPtr, 0xe0)), alpha, prime)), minus_z),
                        prime
                    ),
                    prime
                )
                valuesPtr := add(valuesPtr, 0x100)
            }
            // Handle leftover.
            // Translate addr to the beginning of the last incomplete batch.
            addr := sub(addr, 7)
            for {
            } lt(addr, lastAddr) {
                addr := add(addr, 1)
            } {
                let address_value_lin_comb := addmod(
                    addr,
                    mulmod(mload(valuesPtr), alpha, prime),
                    prime
                )
                prod := mulmod(prod, add(z, sub(prime, address_value_lin_comb)), prime)
                valuesPtr := add(valuesPtr, 0x20)
            }
            memoryHash := keccak256(add(values, 0x20), mul(0x20, nValues))
        }
        factHash = keccak256(
            abi.encodePacked(CONTINUOUS_PAGE, prime, nValues, z, alpha, prod, memoryHash, startAddr)
        );
        emit LogMemoryPageFactContinuous(factHash, memoryHash, prod);
        registerFact(factHash);
    }
}