""" https://leetcode.com/problems/minimum-sum-of-squared-difference/
Fill gap trick, pretty much the same as the 2233.
"""
class Solution:
    def minSumSquareDiff(self, nums1: List[int], nums2: List[int], k1: int, k2: int) -> int:
        pq = [-abs(x-y) for x, y in list(zip(nums1, nums2))]
        if -sum(pq)<=(k1+k2): return 0
        
        heapify(pq)
        k = k1+k2
        n = len(pq)
        while k:
            mx = heappop(pq)
            if pq: gap = max(k//n, 1)
            else: gap = k
            
            heappush(pq, mx+gap)
            k -= gap
        return sum([e*e for e in pq])
    
"""
[1,2,3,4]
[2,10,20,19]
0
0
[1,4,10,12]
[5,8,6,9]
1
1
[10,10,10,11,5]
[1,0,6,6,1]
11
27
[74387,41994,40196,83260,32678,40043,83955,55676,6016,66005,51334,27998,32243,69514,66777,37220,8014,61836,80146,62804,21368,84047,91372,817,84320,18141,27906,15216,45994,32117,98244,34190,38556,77652,76906,14821,50688,39835,91985,82354,31470,88465,45999,56120,45576,31101,46332,57245,14689,40718,88331,24187,70150,21082,26567,87418,46673,10405,89172,29734,19501,77176,27349,94557,36549,84810,71226,37889,79873,96675,95294,62996,58366,19174,3054,48038,15095,5943,85348,82303,39600,8430,43920,31191,27897,13382,21190,14596,39226,94463,94104,97979,32810,60992,26497,69859,89018,53872,22489,72960,46413,83606,81643,24628,75421,46809,22341,95744,20179,86014,98414,20142,37448,65103,38844,17632,54076,49384,80994,48287,60852,48588,26229,25588,4502,60866,74547,17712,71518,46636,42140,38734,37590,3975,91621,95057,6315,62416,61947,14903,76658,33229,1298,49848,46093,15047,25858,44091,11911,44523,26240,95671,23818,24374,33591,67835,77615,71035,16417,79568,67160,82014,65348,86940,92901,76540,45089,93556,34372,82337,31272,31977,77012,58161,80753,7317,49751,83369,25857,47423,6603,64729,25558,92463,99909,3374,32498,48067,2250,84627,85325,11850,42240,81705,25735,33487,34145,23369,3646,78560,7388,51345,37847,45766,346,34845,55877,40011,15782,73529,70244,4401,45048,76621,33608,61950,12816,34511,34502,54423,68052,20761,68238,34429,90242,69894,88323,18970,18590,49216,55771,97702,72106,7077,54410,51810,85892,90197,30184,13879,63735,92764,71236,41831,25686,39499,88574,20713,89003,19996,28328,86190,8025,82525,55444,66338,90638,21130,46974,55032,76556,23879,19156,11403,84547,48188,77923,88199,54404,52251,49877,59513,7112,5956,96678,32901,51656,37561,4849,50570,45346,19191,4710,38769,19935,75749,14640,59949,34035,39835,99765,28002,74413,92918,99978,85673,41765,37136,54371,44606,11572,9641,13444,49230,73717,79902,28475,1957,29503,68585,71354,15024,87802,36232,64849,42532,13371,30092,47696,99207,56246,79575,48067,63437,80861,86494,67223,10075,77975,69069,52422,47753,1802,17274,77819,94315,63379,92648,84283,86504,72617,33914,6203,79938,62819,2640,30447,92065,82467,79527,83121,97711,51891,34584,85734,95532,94630,35477,48974,39232,6127,95541,86253,28866,60312,58522,80310,50711,79842,29854,10396,58810,6856,53722,22987,64398,24445,85853,65537,48583,26391,57220,48546,30347,79981,71211,37885,94811,37493,25605,25233,65796,16055,17390,88286,68841,610,89122,41434,19110,83514,77201,25474,83203,30119,10311,44960,27749,56037,3857,43356,40739,62563,27283,9352,16824,41781,33973,41034,4986,91690,46071,87467,56549,85112,7846,63869,5710,32072,99159,8709,48538,96089,37106,93769,99738,45674,13468,96024,20712,1634,53170,57642,45189,64348,13590,41360,71067,71333,59864,53281,88243,49043,44396,93973,87701,61766,67608,75559,94652,6374,3942,40899,21212,15586,26121,50386,93094,84336,24864,34658,28219,9870,83922,33020,26424,67732,96710,39776,85616,73517,94536,32888,88362,55187,1337,73405,71072,38110,73218,31417,69103,23203,38832,88106,30860,46177,71073,24995,785,69903,97246,418,52165,79255,80016,39963,89313,34058,35157,54125,92512,12563,24176,70982,3389,26549,36496,37005,23907,10861,4949,46553,52237,79049,67542,95426,28579,48133,92381,65239,96081,58345,10418,82533,15311,63219,4289,99861,54735,90839,67243,29032,69042,97124,57647,22843,48926,77967,61684,26338,48232,62192,73414,50948,40811,32697,21595,46985,90007,49219,10883,1124,15722,51202,27149,12413,43696,31483,29330,13586,53612,15143,56565,59817,56001,11241,97612,28670,63969,67040,31004,45541,34906,38997,64729,44251,14229,95554,77447,51095,9098,61148,38767,4823,957,85830,97110,80318,5544,99030,98951,88828,43672,32235,19173,11058,93359,40785,409,15658,31004,93780,54456,33941,68420,91478,26934,49507,86070,74141,73878,30947,91027,91527,48020,34836,41677,88500,79114,25143,62751,56917,61534,34160,17720,5960,45145,33472,18360,90509,29440,97723,38196,47485,23511,52664,84789,96575,53132,637,62951,2535,69557,24832,54495,46571,96825,32399,13358,24343,69357,31679,53238,79397,15805,86142,57290,24109,21850,49127,74090,93977,98549,37848,84946,77255,48298,24332,20319,68100,30202,64511,67672,47474,39369,40761,13028,5599,43683,51929,85277,64307,41717,61102,69872,68022,35580,88245,95519,33573,37534,22746,64561,94616,51817,44687,34678,70926,32119,50428,45943,79594,4039,93630,41405,42962,49154,10147,10111,11413,22904,61137,51153,40563,70454,65030,32540,92827,32553,639,67728,82290,96970,24948,89411,74365,52169,67987,34148,23549,34414,38239,40251,29316,4810,36434,28856,7327,24573,2864,7230,47494,6877,50096,35574,6004,22362,42878,19389,85486,84833,75196,4516,15832,23963,66921,45791,92674,47912,57095,61408,35255,97449,68288,15149,73791,26622,41857,4891,52578,26937,47068,64871,13329,33870,71935,77047,37612,82486,16907,1524,80098,26095,76965,37775,54376,88408,20496,83886,1748,64726,81447,60723,22768,27470,56864,13831,58961,32730,99847,23728,95756,98983,77213,48402,49735,95504,90100,68102,5342,12930,66010,90591,47513,98276,76708,88123,3633,58908,87855,37770,47823,46940,94297,62372,35327,53822,93508,26894,25267,35931,34099,13852,14168,37658,13840,13921,45777,6548,72681,15346,11718,95091,25298,37285,84579,42703,35365,16357,71633,17735,68725,39200,13650,14749,73014,29782,66986,22815,66494,22748,55096,43196,23916,44281,36089,86433,11241,51968,26407,6914,58712,93588,72201,29482,80952,27872,31038,53506,55179,41082,81720,52801,8187,13453,25726,70558,91392,7326,14425,15486,43683,44775,7149,5022,72529,51043,49066,16037,69749,3705,16186,56392,33510,45636,99906,99963,77838,68149,66122,9327,79396,67404,1198,74634,25221,65386,24389,79746,83805,66239,40917,40554,57870,77728,29359,32579,95331,43890,22383,63652,11386,43030,72103,79153,69852,96055,49616,79226,85384,82135,7056,75164,82339,93632,78017,45031,61324,98678,91369,25762,12306,66513,37776,47135,52069,16193,66234,28812,23265,59143,46364,62910,11315,99738,39910,38486,56492,55261,70279,58637,38992,99697,44261,74697,92629,1660,76300,19067,6073,46888,79879,11406,61139,65201,44382,85637,5161,40752]
[67248,47759,31943,85669,62076,36669,18696,15180,56709,88389,56455,40622,38016,78089,75226,43187,5317,61929,71040,62668,23383,84727,86053,62979,84682,71542,76827,40588,55166,28240,89907,77,11492,72942,68440,16463,60096,13232,16277,72613,72877,61322,75569,51294,49172,37089,49810,43521,11267,27210,88701,73365,67025,46485,53499,27848,86250,55729,83821,29351,18280,68119,27944,96728,91123,52876,35017,44142,72095,53247,73498,53072,6899,61881,84333,47257,77963,11080,83994,29397,43001,979,50792,42921,28220,71216,14742,14047,21958,20625,96550,54291,6847,38196,27799,32971,83157,56577,33629,80634,46163,74498,54880,28861,78786,49564,24132,9931,88661,78219,90437,20928,40365,3397,80409,25951,48571,88293,76690,45200,68695,52070,22664,28253,2406,61842,62960,8046,74538,2236,99341,45306,37614,62289,91400,73232,5641,67388,22973,21324,13992,22693,97591,79593,44589,54653,69677,10148,15889,5818,35292,95314,7461,36520,43226,64682,30231,64049,24542,85850,69013,68053,68768,80961,56185,22991,54839,84127,20903,88975,25571,74109,84571,8173,72399,6975,30642,87220,33362,30499,3521,58653,94066,64397,92877,146,36602,51294,67188,81781,84482,12530,45221,90132,20119,35458,50237,83944,12933,87092,57417,97958,47109,55334,56607,43890,55554,30124,19239,67877,39164,48958,54048,77706,93943,19799,19607,35998,39626,63060,85255,21357,60090,40474,57089,72055,95446,42708,86403,35706,64833,66199,70731,14056,39112,43578,90034,5699,89204,24299,92819,42547,57437,36751,20238,6088,75901,5431,89459,22373,31414,16980,60731,23441,63059,42406,94889,89972,47672,50789,35015,1248,27584,4458,54448,54555,86643,99729,42965,8146,51755,64190,7297,7048,93627,98835,39785,31076,24429,50300,49819,34082,13748,6093,75150,76632,8060,57487,42040,17257,91451,29756,52123,84168,90885,6131,35343,32148,84877,23957,7293,73316,6455,66246,82586,82795,32811,94660,35178,31442,48114,24085,86712,36388,32724,71289,32206,6670,26625,40274,48309,86627,81410,64788,87069,24416,2901,15959,83270,77339,73324,68985,7308,11608,89379,64447,35935,88615,19516,95838,14016,48653,12456,6793,57663,80900,39158,83246,89633,51469,78378,99077,44970,25295,94713,83951,91424,33334,50591,97515,17864,54233,84613,21395,57997,22928,23444,52799,81044,87779,99216,50838,16638,3299,97551,3476,20614,99479,72482,62702,96358,54238,15949,64922,79350,70876,32731,89802,61475,14379,32903,31588,7195,27009,84436,57430,1465,96974,46304,53221,36487,83870,20590,41781,39388,44412,15411,63762,69095,89617,48973,83059,21369,23194,70706,35909,39926,26054,35581,76839,86549,58710,89380,15516,81093,371,15544,4861,41811,99463,14098,25308,66321,33045,18042,51158,46791,4119,69321,14139,374,1278,64508,14447,61306,3059,33177,82606,68238,91189,40968,80372,5666,42906,54223,26882,64026,64077,38573,92074,9409,2466,41750,13642,63469,35972,58690,15766,79386,11578,57573,37663,69352,17712,69116,33035,67777,96464,43259,84211,79177,38251,29965,14454,56776,503,72936,70740,59406,65949,40425,71996,32275,32486,58860,74705,49886,76976,34368,95319,63886,28989,4380,76948,73018,42803,43965,86741,42103,84428,5339,90671,2837,19736,89239,3332,46526,28413,41511,28391,36582,71389,50260,5203,66006,65629,37800,37991,82580,96518,69299,93886,49157,33876,94596,5579,47848,10492,96665,40765,86054,61498,29785,75629,38549,30023,67988,48018,25411,53832,206,55734,70274,76654,53016,69592,26719,19895,69505,96212,71875,5296,46355,10190,49296,29721,4634,53740,22494,22522,32273,30302,85972,53421,63806,26280,3095,96940,21697,52725,74372,44154,37110,26611,31901,42571,38473,44492,94880,116,60271,86401,60631,42410,4676,25860,89635,93343,12602,95270,98192,84581,57186,79228,27871,28357,6796,90994,42898,6803,17809,26150,88978,47399,26458,61775,18440,27834,55752,85751,82539,81784,44202,75042,97858,40530,26026,40132,39096,13231,64393,54293,60645,70419,29492,23425,929,5108,40775,8710,97599,30120,89820,7682,49990,13708,34257,24028,87791,61565,45192,68228,94520,78968,34061,31632,40168,96347,30834,78611,17236,76329,40362,50216,89179,38503,88775,62690,24274,19289,45217,75827,63475,98248,9359,21724,78060,41947,35382,66657,17130,26286,55428,45375,50970,43925,5860,97144,9079,98076,86390,33367,62534,48625,52911,45545,68805,40145,92586,5351,64971,62094,20388,71265,85284,15023,24596,42571,64455,32884,48469,60410,57765,12215,13133,39670,92847,59040,10321,2935,1338,83509,55454,19210,40194,70470,71387,39832,85177,24940,56425,70219,43451,23799,27813,90032,79005,48544,70457,82263,31484,38565,36199,90408,95198,65516,74890,36153,11420,16015,10712,69663,12671,57497,60867,93286,11632,16067,46870,13158,93315,72288,83110,50021,35779,15950,73428,54113,94496,3213,53061,52671,26398,58096,45923,56576,47922,84373,42666,9408,43991,22035,44052,60949,58933,35290,2432,94475,39055,77329,17709,10988,84500,28467,82278,52813,51063,72051,27561,75214,65486,68823,87666,57249,12822,6468,21007,10298,31801,61922,59979,42527,61700,99800,2315,35529,47274,81038,1919,60863,14583,35268,36301,79387,93816,60528,78624,90701,8946,28839,90869,38551,41994,26084,87691,63725,35214,67506,91042,63070,24367,26199,1470,8089,5730,44146,47541,23855,2323,9692,78482,38975,2734,97595,20254,22735,41133,39551,39716,22729,75372,13136,60337,32081,96900,96680,33755,54687,30136,19545,56043,15819,52517,48557,29454,20246,878,78816,25144,42395,24961,6267,63091,86217,96863,44045,74178,22151,33554,78493,58227,48492,41735,91791,7314,71658,59731,80032,92024,64498,49550,6450,52129,12062,86002,11149,87353,31692,48003,44656,63030,15367,12627,18907,31122,45271,78047,81963,62176,73324,60411,10026,80375,8797,3142,29462,77696,98139,30055,82999,79246,63056,47379,37277,64741,39894,27940,74418,86301,13508,70936,61313,12418,5256,97581,15451,11179,88548,43394,80965,90405,63142,11373,67089,74195,88064,39178,72674,55831,28119,8377,25418,60825,68031,32149,50240,58637,99180,67331,22293,64373,52849,68298,72385,88360,94355,70301,37974,94152,64137,64779,57520,48863,95615,86806,92443,42918,97485,84215,54623,31266,99743,93278,15531,69333,12733,43203,89296,10911,78833]
18320583
781606
[7,11,4,19,11,5,6,1,8]
[4,7,6,16,12,9,10,2,10]
3
6
"""
b3a9a4cf8577b82518f8367e50bb5764516fee77
<mask token>

<mask token>


class Solution:
    <mask token>


<mask token>

<mask token>


class Solution:

    def minSumSquareDiff(self, nums1: List[int], nums2: List[int], k1: int,
        k2: int) ->int:
        pq = [(-abs(x - y)) for x, y in list(zip(nums1, nums2))]
        if -sum(pq) <= k1 + k2:
            return 0
        heapify(pq)
        k = k1 + k2
        n = len(pq)
        while k:
            mx = heappop(pq)
            if pq:
                gap = max(k // n, 1)
            else:
                gap = k
            heappush(pq, mx + gap)
            k -= gap
        return sum([(e * e) for e in pq])


<mask token>

""" https://leetcode.com/problems/minimum-sum-of-squared-difference/
Fill gap trick, pretty much the same as the 2233.
"""
class Solution:
    def minSumSquareDiff(self, nums1: List[int], nums2: List[int], k1: int, k2: int) -> int:
        pq = [-abs(x-y) for x, y in list(zip(nums1, nums2))]
        if -sum(pq)<=(k1+k2): return 0
        
        heapify(pq)
        k = k1+k2
        n = len(pq)
        while k:
            mx = heappop(pq)
            if pq: gap = max(k//n, 1)
            else: gap = k
            
            heappush(pq, mx+gap)
            k -= gap
        return sum([e*e for e in pq])
    
"""
[1,2,3,4]
[2,10,20,19]
0
0
[1,4,10,12]
[5,8,6,9]
1
1
[10,10,10,11,5]
[1,0,6,6,1]
11
27
[74387,41994,40196,83260,32678,40043,83955,55676,6016,66005,51334,27998,32243,69514,66777,37220,8014,61836,80146,62804,21368,84047,91372,817,84320,18141,27906,15216,45994,32117,98244,34190,38556,77652,76906,14821,50688,39835,91985,82354,31470,88465,45999,56120,45576,31101,46332,57245,14689,40718,88331,24187,70150,21082,26567,87418,46673,10405,89172,29734,19501,77176,27349,94557,36549,84810,71226,37889,79873,96675,95294,62996,58366,19174,3054,48038,15095,5943,85348,82303,39600,8430,43920,31191,27897,13382,21190,14596,39226,94463,94104,97979,32810,60992,26497,69859,89018,53872,22489,72960,46413,83606,81643,24628,75421,46809,22341,95744,20179,86014,98414,20142,37448,65103,38844,17632,54076,49384,80994,48287,60852,48588,26229,25588,4502,60866,74547,17712,71518,46636,42140,38734,37590,3975,91621,95057,6315,62416,61947,14903,76658,33229,1298,49848,46093,15047,25858,44091,11911,44523,26240,95671,23818,24374,33591,67835,77615,71035,16417,79568,67160,82014,65348,86940,92901,76540,45089,93556,34372,82337,31272,31977,77012,58161,80753,7317,49751,83369,25857,47423,6603,64729,25558,92463,99909,3374,32498,48067,2250,84627,85325,11850,42240,81705,25735,33487,34145,23369,3646,78560,7388,51345,37847,45766,346,34845,55877,40011,15782,73529,70244,4401,45048,76621,33608,61950,12816,34511,34502,54423,68052,20761,68238,34429,90242,69894,88323,18970,18590,49216,55771,97702,72106,7077,54410,51810,85892,90197,30184,13879,63735,92764,71236,41831,25686,39499,88574,20713,89003,19996,28328,86190,8025,82525,55444,66338,90638,21130,46974,55032,76556,23879,19156,11403,84547,48188,77923,88199,54404,52251,49877,59513,7112,5956,96678,32901,51656,37561,4849,50570,45346,19191,4710,38769,19935,75749,14640,59949,34035,39835,99765,28002,74413,92918,99978,85673,41765,37136,54371,44606,11572,9641,13444,49230,73717,79902,28475,1957,29503,68585,71354,15024,87802,36232,64849,42532,13371,30092,47696,99207,56246,79575,48067,63437,80861,86494,67223,10075,77975,69069,52422,47753,1802,17274,77819,94315,63379,92648,84283,86504,72617,33914,6203,79938,62819,2640,30447,92065,82467,79527,83121,97711,51891,34584,85734,95532,94630,35477,48974,39232,6127,95541,86253,28866,60312,58522,80310,50711,79842,29854,10396,58810,6856,53722,22987,64398,24445,85853,65537,48583,26391,57220,48546,30347,79981,71211,37885,94811,37493,25605,25233,65796,16055,17390,88286,68841,610,89122,41434,19110,83514,77201,25474,83203,30119,10311,44960,27749,56037,3857,43356,40739,62563,27283,9352,16824,41781,33973,41034,4986,91690,46071,87467,56549,85112,7846,63869,5710,32072,99159,8709,48538,96089,37106,93769,99738,45674,13468,96024,20712,1634,53170,57642,45189,64348,13590,41360,71067,71333,59864,53281,88243,49043,44396,93973,87701,61766,67608,75559,94652,6374,3942,40899,21212,15586,26121,50386,93094,84336,24864,34658,28219,9870,83922,33020,26424,67732,96710,39776,85616,73517,94536,32888,88362,55187,1337,73405,71072,38110,73218,31417,69103,23203,38832,88106,30860,46177,71073,24995,785,69903,97246,418,52165,79255,80016,39963,89313,34058,35157,54125,92512,12563,24176,70982,3389,26549,36496,37005,23907,10861,4949,46553,52237,79049,67542,95426,28579,48133,92381,65239,96081,58345,10418,82533,15311,63219,4289,99861,54735,90839,67243,29032,69042,97124,57647,22843,48926,77967,61684,26338,48232,62192,73414,50948,40811,32697,21595,46985,90007,49219,10883,1124,15722,51202,27149,12413,43696,31483,29330,13586,53612,15143,56565,59817,56001,11241,97612,28670,63969,67040,31004,45541,34906,38997,64729,44251,14229,95554,77447,51095,9098,61148,38767,4823,957,85830,97110,80318,5544,99030,98951,88828,43672,32235,19173,11058,93359,40785,409,15658,31004,93780,54456,33941,68420,91478,26934,49507,86070,74141,73878,30947,91027,91527,48020,34836,41677,88500,79114,25143,62751,56917,61534,34160,17720,5960,45145,33472,18360,90509,29440,97723,38196,47485,23511,52664,84789,96575,53132,637,62951,2535,69557,24832,54495,46571,96825,32399,13358,24343,69357,31679,53238,79397,15805,86142,57290,24109,21850,49127,74090,93977,98549,37848,84946,77255,48298,24332,20319,68100,30202,64511,67672,47474,39369,40761,13028,5599,43683,51929,85277,64307,41717,61102,69872,68022,35580,88245,95519,33573,37534,22746,64561,94616,51817,44687,34678,70926,32119,50428,45943,79594,4039,93630,41405,42962,49154,10147,10111,11413,22904,61137,51153,40563,70454,65030,32540,92827,32553,639,67728,82290,96970,24948,89411,74365,52169,67987,34148,23549,34414,38239,40251,29316,4810,36434,28856,7327,24573,2864,7230,47494,6877,50096,35574,6004,22362,42878,19389,85486,84833,75196,4516,15832,23963,66921,45791,92674,47912,57095,61408,35255,97449,68288,15149,73791,26622,41857,4891,52578,26937,47068,64871,13329,33870,71935,77047,37612,82486,16907,1524,80098,26095,76965,37775,54376,88408,20496,83886,1748,64726,81447,60723,22768,27470,56864,13831,58961,32730,99847,23728,95756,98983,77213,48402,49735,95504,90100,68102,5342,12930,66010,90591,47513,98276,76708,88123,3633,58908,87855,37770,47823,46940,94297,62372,35327,53822,93508,26894,25267,35931,34099,13852,14168,37658,13840,13921,45777,6548,72681,15346,11718,95091,25298,37285,84579,42703,35365,16357,71633,17735,68725,39200,13650,14749,73014,29782,66986,22815,66494,22748,55096,43196,23916,44281,36089,86433,11241,51968,26407,6914,58712,93588,72201,29482,80952,27872,31038,53506,55179,41082,81720,52801,8187,13453,25726,70558,91392,7326,14425,15486,43683,44775,7149,5022,72529,51043,49066,16037,69749,3705,16186,56392,33510,45636,99906,99963,77838,68149,66122,9327,79396,67404,1198,74634,25221,65386,24389,79746,83805,66239,40917,40554,57870,77728,29359,32579,95331,43890,22383,63652,11386,43030,72103,79153,69852,96055,49616,79226,85384,82135,7056,75164,82339,93632,78017,45031,61324,98678,91369,25762,12306,66513,37776,47135,52069,16193,66234,28812,23265,59143,46364,62910,11315,99738,39910,38486,56492,55261,70279,58637,38992,99697,44261,74697,92629,1660,76300,19067,6073,46888,79879,11406,61139,65201,44382,85637,5161,40752]
[67248,47759,31943,85669,62076,36669,18696,15180,56709,88389,56455,40622,38016,78089,75226,43187,5317,61929,71040,62668,23383,84727,86053,62979,84682,71542,76827,40588,55166,28240,89907,77,11492,72942,68440,16463,60096,13232,16277,72613,72877,61322,75569,51294,49172,37089,49810,43521,11267,27210,88701,73365,67025,46485,53499,27848,86250,55729,83821,29351,18280,68119,27944,96728,91123,52876,35017,44142,72095,53247,73498,53072,6899,61881,84333,47257,77963,11080,83994,29397,43001,979,50792,42921,28220,71216,14742,14047,21958,20625,96550,54291,6847,38196,27799,32971,83157,56577,33629,80634,46163,74498,54880,28861,78786,49564,24132,9931,88661,78219,90437,20928,40365,3397,80409,25951,48571,88293,76690,45200,68695,52070,22664,28253,2406,61842,62960,8046,74538,2236,99341,45306,37614,62289,91400,73232,5641,67388,22973,21324,13992,22693,97591,79593,44589,54653,69677,10148,15889,5818,35292,95314,7461,36520,43226,64682,30231,64049,24542,85850,69013,68053,68768,80961,56185,22991,54839,84127,20903,88975,25571,74109,84571,8173,72399,6975,30642,87220,33362,30499,3521,58653,94066,64397,92877,146,36602,51294,67188,81781,84482,12530,45221,90132,20119,35458,50237,83944,12933,87092,57417,97958,47109,55334,56607,43890,55554,30124,19239,67877,39164,48958,54048,77706,93943,19799,19607,35998,39626,63060,85255,21357,60090,40474,57089,72055,95446,42708,86403,35706,64833,66199,70731,14056,39112,43578,90034,5699,89204,24299,92819,42547,57437,36751,20238,6088,75901,5431,89459,22373,31414,16980,60731,23441,63059,42406,94889,89972,47672,50789,35015,1248,27584,4458,54448,54555,86643,99729,42965,8146,51755,64190,7297,7048,93627,98835,39785,31076,24429,50300,49819,34082,13748,6093,75150,76632,8060,57487,42040,17257,91451,29756,52123,84168,90885,6131,35343,32148,84877,23957,7293,73316,6455,66246,82586,82795,32811,94660,35178,31442,48114,24085,86712,36388,32724,71289,32206,6670,26625,40274,48309,86627,81410,64788,87069,24416,2901,15959,83270,77339,73324,68985,7308,11608,89379,64447,35935,88615,19516,95838,14016,48653,12456,6793,57663,80900,39158,83246,89633,51469,78378,99077,44970,25295,94713,83951,91424,33334,50591,97515,17864,54233,84613,21395,57997,22928,23444,52799,81044,87779,99216,50838,16638,3299,97551,3476,20614,99479,72482,62702,96358,54238,15949,64922,79350,70876,32731,89802,61475,14379,32903,31588,7195,27009,84436,57430,1465,96974,46304,53221,36487,83870,20590,41781,39388,44412,15411,63762,69095,89617,48973,83059,21369,23194,70706,35909,39926,26054,35581,76839,86549,58710,89380,15516,81093,371,15544,4861,41811,99463,14098,25308,66321,33045,18042,51158,46791,4119,69321,14139,374,1278,64508,14447,61306,3059,33177,82606,68238,91189,40968,80372,5666,42906,54223,26882,64026,64077,38573,92074,9409,2466,41750,13642,63469,35972,58690,15766,79386,11578,57573,37663,69352,17712,69116,33035,67777,96464,43259,84211,79177,38251,29965,14454,56776,503,72936,70740,59406,65949,40425,71996,32275,32486,58860,74705,49886,76976,34368,95319,63886,28989,4380,76948,73018,42803,43965,86741,42103,84428,5339,90671,2837,19736,89239,3332,46526,28413,41511,28391,36582,71389,50260,5203,66006,65629,37800,37991,82580,96518,69299,93886,49157,33876,94596,5579,47848,10492,96665,40765,86054,61498,29785,75629,38549,30023,67988,48018,25411,53832,206,55734,70274,76654,53016,69592,26719,19895,69505,96212,71875,5296,46355,10190,49296,29721,4634,53740,22494,22522,32273,30302,85972,53421,63806,26280,3095,96940,21697,52725,74372,44154,37110,26611,31901,42571,38473,44492,94880,116,60271,86401,60631,42410,4676,25860,89635,93343,12602,95270,98192,84581,57186,79228,27871,28357,6796,90994,42898,6803,17809,26150,88978,47399,26458,61775,18440,27834,55752,85751,82539,81784,44202,75042,97858,40530,26026,40132,39096,13231,64393,54293,60645,70419,29492,23425,929,5108,40775,8710,97599,30120,89820,7682,49990,13708,34257,24028,87791,61565,45192,68228,94520,78968,34061,31632,40168,96347,30834,78611,17236,76329,40362,50216,89179,38503,88775,62690,24274,19289,45217,75827,63475,98248,9359,21724,78060,41947,35382,66657,17130,26286,55428,45375,50970,43925,5860,97144,9079,98076,86390,33367,62534,48625,52911,45545,68805,40145,92586,5351,64971,62094,20388,71265,85284,15023,24596,42571,64455,32884,48469,60410,57765,12215,13133,39670,92847,59040,10321,2935,1338,83509,55454,19210,40194,70470,71387,39832,85177,24940,56425,70219,43451,23799,27813,90032,79005,48544,70457,82263,31484,38565,36199,90408,95198,65516,74890,36153,11420,16015,10712,69663,12671,57497,60867,93286,11632,16067,46870,13158,93315,72288,83110,50021,35779,15950,73428,54113,94496,3213,53061,52671,26398,58096,45923,56576,47922,84373,42666,9408,43991,22035,44052,60949,58933,35290,2432,94475,39055,77329,17709,10988,84500,28467,82278,52813,51063,72051,27561,75214,65486,68823,87666,57249,12822,6468,21007,10298,31801,61922,59979,42527,61700,99800,2315,35529,47274,81038,1919,60863,14583,35268,36301,79387,93816,60528,78624,90701,8946,28839,90869,38551,41994,26084,87691,63725,35214,67506,91042,63070,24367,26199,1470,8089,5730,44146,47541,23855,2323,9692,78482,38975,2734,97595,20254,22735,41133,39551,39716,22729,75372,13136,60337,32081,96900,96680,33755,54687,30136,19545,56043,15819,52517,48557,29454,20246,878,78816,25144,42395,24961,6267,63091,86217,96863,44045,74178,22151,33554,78493,58227,48492,41735,91791,7314,71658,59731,80032,92024,64498,49550,6450,52129,12062,86002,11149,87353,31692,48003,44656,63030,15367,12627,18907,31122,45271,78047,81963,62176,73324,60411,10026,80375,8797,3142,29462,77696,98139,30055,82999,79246,63056,47379,37277,64741,39894,27940,74418,86301,13508,70936,61313,12418,5256,97581,15451,11179,88548,43394,80965,90405,63142,11373,67089,74195,88064,39178,72674,55831,28119,8377,25418,60825,68031,32149,50240,58637,99180,67331,22293,64373,52849,68298,72385,88360,94355,70301,37974,94152,64137,64779,57520,48863,95615,86806,92443,42918,97485,84215,54623,31266,99743,93278,15531,69333,12733,43203,89296,10911,78833]
18320583
781606
[7,11,4,19,11,5,6,1,8]
[4,7,6,16,12,9,10,2,10]
3
6
"""