EQUI

5
100000000000000 1010120212102102 10101021000 101021021021
def solution(a)

  n = a.length
  equi = Array.new
  for i in 1..n do
    left = a[0..i-1].reduce(:+)
    right = a[i+1..-1].reduce(:+)
    if left == right
      equi.push(i)
    end
    i += 1
  end

end
5
100000000000000 1010120212102102 10101021000 101021021021
3
1 4
5
1 2 3 5
5
1 3 4 7
5
1 3 5 9
5
1 3 4 6
5
1 2 5 6
-1
7
1 2 4 5 6 7
7
2 3 4 5 6 7
7
1 2 3 5 6 7
7
1 2 4 5 6 11
7
-3 1 2 3 4 5
-1
3
1 4
5
1 2 3 5
5
1 3 4 7
5
1 3 5 9
5
1 3 4 6
5
1 2 5 6
-1
7
1 2 4 5 6 7
7
2 3 4 5 6 7
7
1 2 3 5 6 7
7
1 2 4 5 6 11
7
-3 1 2 3 4 5
-1
500
-99997876447673
-99998842219971
-99998010264215
-99998702872865
-99998216843249
-99997902807035
-99999160601595
-99999178797699
-99999425830009
-99999916466886
-99999098000598
-99999358332083
-99998892611033
-99998772588209
-99998389830257
-99999891540625
-99998098736704
-99998026209492
-99999963393871
-99998710085046
-99998644818363
-99998280962650
-99999949057196
-99999761670810
-99998213388754
-99999283412918
-99999662856347
-99998298812105
-99999624065447
-99998034840178
-99998830879131
-99999663014542
-99998773440204
-99999241328982
-99998617850034
-99999464547180
-99997963968665
-99998042143142
-99999910074239
-99998861023026
-99999184728369
-99997984090016
-99998770660920
-99999204157686
-99997945582178
-99999939031895
-99999823995894
-99999811691485
-99998981213237
-99999833511460
-99998222679302
-99998702523709
-99998897366810
-99998902712422
-99999004978169
-99997887933247
-99998444009064
-99999688875437
-99998279656293
-99999478206713
-99998709501491
-99998296613572
-99997949405274
-99999758754261
-99999001081200
-99999920134839
-99999449161019
-99998247383855
-99998712670105
-99999402897663
-99998693328830
-99998198485052
-99999691741659
-99998167419232
-99999174200291
-99999664448937
-99998125460621
-99998660081298
-99998667161969
-99998000121135
-99998568025440
-99998196887928
-99998658631162
-99999228028548
-99998916235291
-99999804655968
-99999497084852
-99998330023112
-99998587061016
-99999536624384
-99999646147084
-99999417997005
-99999411000783
-99998498299817
-99998277915770
-99999055375233
-99999373608252
-99998060278160
-99998291927461
-99999419418079
-99999081981786
-99998218275533
-99999480616876
-99998095636199
-99998742690916
-99998588645284
-99998271744158
-99999370050197
-99998811700013
-99999622329450
-99998621426818
-99999265247430
-99999448700908
-99999435971750
-99998652201130
-99998599379968
-99999960061260
-99998242265089
-99999668393874
-99998107714789
-99998612223828
-99999110176342
-99998235244158
-99999636492277
-99999169634169
-99998634522421
-99998141952035
-99998212213652
-99999390615262
-99999201190138
-99999562096835
-99999271897891
-99999725549043
-99999121290434
-99998903884486
-99997908758347
-99998789054579
-99999594974482
-99998346014852
-99998860246262
-99999642285469
-99999574973009
-99999066703706
-99998028759517
-99998649277910
-99999359174615
-99999530031851
-99998450114985
-99998987548019
-99999992869740
-99999360573488
-99999617307102
-99999008758242
-99998344292348
-99999517403520
-99998672421955
-99998294464248
-99998525630811
-99999136843576
-99997896711008
-99998304560621
-99999220355033
-99999422728042
-99999470549440
-99998567223956
-99999023750279
-99998212913899
-99998531776700
-99998437674261
-99998770347123
-99999960852925
-99998816195395
-99999875976258
-99999250820975
-99999150252509
-99998689206869
-99998804310863
-99999864139345
-99998535808174
-99999295861357
-99999748927126
-99998470203848
-99997900283491
-99998500423520
-99998746192177
-99999770102626
-99999630683592
-99998628125331
-99998344876428
-99998765187663
-99997867602493
-99998426698841
-99998296897747
-99999017791514
-99999571212371
-99998796818738
-99999338513122
-99998282502332
-99998314211511
-99998030107921
-99998933141429
-99999514891927
-99999429692986
-99998670278772
-99999998113508
-99998096092160
-99999087132053
-99998054918372
-99999419759141
-99997999199935
-99998312110979
-99998835726382
-99998842265718
-99999104535177
-99998801980125
-99999737235535
-99998403435860
-99999092871656
-99999360177220
-99999744098863
-99999923718049
-99997967371007
-99999022606252
-99999813482793
-99999961883350
-99998683284324
-99999096329070
-99999681399955
-99997875090014
-99999087349068
-99998391801355
-99998596433837
-99997873320760
-99998492465969
-99998438068580
-99998771478176
-99998507928627
-99998508399643
-99997956539546
-99999788394560
-99999517652651
-99998839071784
-99998078938849
-99998656078841
-99999061479219
-99999897163789
-99998215803274
-99999157123731
-99999766736798
-99998694326351
-99999908046755
-99998680458007
-99998501806252
-99998445274343
-99999027397567
-99998713015730
-99998218253199
-99998471491064
-99998649956408
-99999167513578
-99999341307516
-99998569278423
-99998295080967
-99998574265417
-99998441969717
-99998112534106
-99999105758087
-99999868563384
-99998219478235
-99998670471184
-99999145790116
-99998118083269
-99999973917484
-99999451195847
-99998875499510
-99999011284287
-99998174476301
-99998709363563
-99998517258617
-99999695225523
-99999606003776
-99999702751819
-99998582407886
-99998473599851
-99999330140002
-99998947332551
-99998446993634
-99999515635336
-99998410264433
-99999546580519
-99998902856497
-99999987179699
-99998277142973
-99998154744048
-99997875928185
-99998186883769
-99999017936720
-99999168906922
-99998077598479
-99998074457391
-99998736168944
-99999147980926
-99999512506869
-99998069407293
-99999595745670
-99998854772274
-99998566284304
-99998254299032
-99999871610204
-99999669586227
-99997875325027
-99998165296647
-99999508787708
-99998116153139
-99998071061047
-99998036269561
-99999860355350
-99999882786454
-99999436652983
-99998763223428
-99999810159680
-99999522848231
-99998243015348
-99999823614073
-99998056286835
-99998705918080
-99999431344080
-99999095690483
-99998659851926
-99999127636940
-99999021600221
-99999020751843
-99999486583154
-99999694648817
-99999178920214
-99998879959867
-99998905081797
-99999728902482
-99999032282544
-99999904015823
-99998890890471
-99999903865072
-99998824285488
-99999144460650
-99999964467486
-99998100060287
-99999990673784
-99999751448751
-99998706678617
-99999466683692
-99999578374833
-99998771468402
-99998485183012
-99998065579603
-99998078852762
-99999138672117
-99999903651594
-99999450721808
-99998984672212
-99998021122779
-99998937056680
-99998684459732
-99999552359604
-99998480009662
-99999140550866
-99997874678201
-99998192322881
-99999997076956
-99998363148737
-99999887037544
-99998134097735
-99999781728471
-99999589275747
-99999343892137
-99998472643429
-99998732317505
-99998107408445
-99999722634237
-99998745256355
-99998543921265
-99999810881522
-99999395515970
-99998159759274
-99999888792499
-99999409558445
-99999192826045
-99997873858001
-99999824635226
-99998546749756
-99998062425062
-99998313829450
-99998821208499
-99999675946956
-99998235877507
-99999278995122
-99999684029952
-99998402251151
-99999242707104
-99998379796517
-99998688841566
-99998367032195
-99998822239597
-99998559367476
-99998055583172
-99999185781784
-99998413004730
-99997918605019
-99999555176440
-99998280261961
-99999539009829
-99999382350408
-99999478276411
-99999780627014
-99998956515570
-99998606955843
-99998792676110
-99999259621833
-99999357558003
-99998108044792
-99998102455974
-99998641164621
-99999168394844
-99998285937421
-99999834822764
-99998165642753
-99999327784853
-99998332066959
-99999886053084
-99997994445505
-99999121732082
-99999994775746
-99999673301386
-99999223847440
-99999971686243
-99998363427651
-99999692706134
-99999147870691
-99999033969087
-99999427905946
-99998155508042
-99998658778587
-99999521114839
-99999015013210
-99999690816516
-99998324315455
-99998107464968
-99999472260392
-99999185218696
-99999141243291
-99999937252157
-99999852540533
-99999257547305
-99998821365981
-99999797246245
-99999246015697
-99998345424651
-99998381926219
-99998463213482
-99998031433957
-99999326838374
-99999823078633
-99999323337654
-99998301287040
-99998092325835
-99998097050108
-99999692216167
-99999728747310
-99999277349654
-99998685587505
-99999182675971
-99998807762322
-99998163713030
-99999303594000
-99997937528231
-99998115061113
-99999010676731
-99999288428405
-99999482307861
-99998584200179
-99999008135951
-99999572039659
-99998217669311
-99998068133539
-99998971502947
-99998920968619
-99998916073804
-99999022732666
-99999878905293
-99999786670659
-99998212126136
-99999735163365
-99998064243898
-99998185689036
-99998388057263
-99997861343471
-99998350358511
-99999685564090
-99999326685484
-99998465422236
-1
500
-99997876447673
-99998842219971
-99998010264215
-99998702872865
-99998216843249
-99997902807035
-99999160601595
-99999178797699
-99999425830009
-99999916466886
-99999098000598
-99999358332083
-99998892611033
-99998772588209
-99998389830257
-99999891540625
-99998098736704
-99998026209492
-99999963393871
-99998710085046
-99998644818363
-99998280962650
-99999949057196
-99999761670810
-99998213388754
-99999283412918
-99999662856347
-99998298812105
-99999624065447
-99998034840178
-99998830879131
-99999663014542
-99998773440204
-99999241328982
-99998617850034
-99999464547180
-99997963968665
-99998042143142
-99999910074239
-99998861023026
-99999184728369
-99997984090016
-99998770660920
-99999204157686
-99997945582178
-99999939031895
-99999823995894
-99999811691485
-99998981213237
-99999833511460
-99998222679302
-99998702523709
-99998897366810
-99998902712422
-99999004978169
-99997887933247
-99998444009064
-99999688875437
-99998279656293
-99999478206713
-99998709501491
-99998296613572
-99997949405274
-99999758754261
-99999001081200
-99999920134839
-99999449161019
-99998247383855
-99998712670105
-99999402897663
-99998693328830
-99998198485052
-99999691741659
-99998167419232
-99999174200291
-99999664448937
-99998125460621
-99998660081298
-99998667161969
-99998000121135
-99998568025440
-99998196887928
-99998658631162
-99999228028548
-99998916235291
-99999804655968
-99999497084852
-99998330023112
-99998587061016
-99999536624384
-99999646147084
-99999417997005
-99999411000783
-99998498299817
-99998277915770
-99999055375233
-99999373608252
-99998060278160
-99998291927461
-99999419418079
-99999081981786
-99998218275533
-99999480616876
-99998095636199
-99998742690916
-99998588645284
-99998271744158
-99999370050197
-99998811700013
-99999622329450
-99998621426818
-99999265247430
-99999448700908
-99999435971750
-99998652201130
-99998599379968
-99999960061260
-99998242265089
-99999668393874
-99998107714789
-99998612223828
-99999110176342
-99998235244158
-99999636492277
-99999169634169
-99998634522421
-99998141952035
-99998212213652
-99999390615262
-99999201190138
-99999562096835
-99999271897891
-99999725549043
-99999121290434
-99998903884486
-99997908758347
-99998789054579
-99999594974482
-99998346014852
-99998860246262
-99999642285469
-99999574973009
-99999066703706
-99998028759517
-99998649277910
-99999359174615
-99999530031851
-99998450114985
-99998987548019
-99999992869740
-99999360573488
-99999617307102
-99999008758242
-99998344292348
-99999517403520
-99998672421955
-99998294464248
-99998525630811
-99999136843576
-99997896711008
-99998304560621
-99999220355033
-99999422728042
-99999470549440
-99998567223956
-99999023750279
-99998212913899
-99998531776700
-99998437674261
-99998770347123
-99999960852925
-99998816195395
-99999875976258
-99999250820975
-99999150252509
-99998689206869
-99998804310863
-99999864139345
-99998535808174
-99999295861357
-99999748927126
-99998470203848
-99997900283491
-99998500423520
-99998746192177
-99999770102626
-99999630683592
-99998628125331
-99998344876428
-99998765187663
-99997867602493
-99998426698841
-99998296897747
-99999017791514
-99999571212371
-99998796818738
-99999338513122
-99998282502332
-99998314211511
-99998030107921
-99998933141429
-99999514891927
-99999429692986
-99998670278772
-99999998113508
-99998096092160
-99999087132053
-99998054918372
-99999419759141
-99997999199935
-99998312110979
-99998835726382
-99998842265718
-99999104535177
-99998801980125
-99999737235535
-99998403435860
-99999092871656
-99999360177220
-99999744098863
-99999923718049
-99997967371007
-99999022606252
99999813482793
99999961883350
99998683284324
99999096329070
99999681399955
99997875090014
99999087349068
99998391801355
99998596433837
99997873320760
99998492465969
99998438068580
99998771478176
99998507928627
99998508399643
99997956539546
99999788394560
99999517652651
99998839071784
99998078938849
99998656078841
99999061479219
99999897163789
99998215803274
99999157123731
99999766736798
99998694326351
99999908046755
99998680458007
99998501806252
99998445274343
99999027397567
99998713015730
99998218253199
99998471491064
99998649956408
99999167513578
99999341307516
99998569278423
99998295080967
99998574265417
99998441969717
99998112534106
99999105758087
99999868563384
99998219478235
99998670471184
99999145790116
99998118083269
99999973917484
99999451195847
99998875499510
99999011284287
99998174476301
99998709363563
99998517258617
99999695225523
99999606003776
99999702751819
99998582407886
99998473599851
99999330140002
99998947332551
99998446993634
99999515635336
99998410264433
99999546580519
99998902856497
99999987179699
99998277142973
99998154744048
99997875928185
99998186883769
99999017936720
99999168906922
99998077598479
99998074457391
99998736168944
99999147980926
99999512506869
99998069407293
99999595745670
99998854772274
99998566284304
99998254299032
99999871610204
99999669586227
99997875325027
99998165296647
99999508787708
99998116153139
99998071061047
99998036269561
99999860355350
99999882786454
99999436652983
99998763223428
99999810159680
99999522848231
99998243015348
99999823614073
99998056286835
99998705918080
99999431344080
99999095690483
99998659851926
99999127636940
99999021600221
99999020751843
99999486583154
99999694648817
99999178920214
99998879959867
99998905081797
99999728902482
99999032282544
99999904015823
99998890890471
99999903865072
99998824285488
99999144460650
99999964467486
99998100060287
99999990673784
99999751448751
99998706678617
99999466683692
99999578374833
99998771468402
99998485183012
99998065579603
99998078852762
99999138672117
99999903651594
99999450721808
99998984672212
99998021122779
99998937056680
99998684459732
99999552359604
99998480009662
99999140550866
99997874678201
99998192322881
99999997076956
99998363148737
99999887037544
99998134097735
99999781728471
99999589275747
99999343892137
99998472643429
99998732317505
99998107408445
99999722634237
99998745256355
99998543921265
99999810881522
99999395515970
99998159759274
99999888792499
99999409558445
99999192826045
99997873858001
99999824635226
99998546749756
99998062425062
99998313829450
99998821208499
99999675946956
99998235877507
99999278995122
99999684029952
99998402251151
99999242707104
99998379796517
99998688841566
99998367032195
99998822239597
99998559367476
99998055583172
99999185781784
99998413004730
99997918605019
99999555176440
99998280261961
99999539009829
99999382350408
99999478276411
99999780627014
99998956515570
99998606955843
99998792676110
99999259621833
99999357558003
99998108044792
99998102455974
99998641164621
99999168394844
99998285937421
99999834822764
99998165642753
99999327784853
99998332066959
99999886053084
99997994445505
99999121732082
99999994775746
99999673301386
99999223847440
99999971686243
99998363427651
99999692706134
99999147870691
99999033969087
99999427905946
99998155508042
99998658778587
99999521114839
99999015013210
99999690816516
99998324315455
99998107464968
99999472260392
99999185218696
99999141243291
99999937252157
99999852540533
99999257547305
99998821365981
99999797246245
99999246015697
99998345424651
99998381926219
99998463213482
99998031433957
99999326838374
99999823078633
99999323337654
99998301287040
99998092325835
99998097050108
99999692216167
99999728747310
99999277349654
99998685587505
99999182675971
99998807762322
99998163713030
99999303594000
99997937528231
99998115061113
99999010676731
99999288428405
99999482307861
99998584200179
99999008135951
99999572039659
99998217669311
99998068133539
99998971502947
99998920968619
99998916073804
99999022732666
99999878905293
99999786670659
99998212126136
99999735163365
99998064243898
99998185689036
99998388057263
99997861343471
99998350358511
99999685564090
99999326685484
99998465422236
-1
500
-99997876447673
-99998842219971
-99998010264215
-99998702872865
-99998216843249
-99997902807035
-99999160601595
-99999178797699
-99999425830009
-99999916466886
-99999098000598
-99999358332083
-99998892611033
-99998772588209
-99998389830257
-99999891540625
-99998098736704
-99998026209492
-99999963393871
-99998710085046
-99998644818363
-99998280962650
-99999949057196
-99999761670810
-99998213388754
-99999283412918
-99999662856347
-99998298812105
-99999624065447
-99998034840178
-99998830879131
-99999663014542
-99998773440204
-99999241328982
-99998617850034
-99999464547180
-99997963968665
-99998042143142
-99999910074239
-99998861023026
-99999184728369
-99997984090016
-99998770660920
-99999204157686
-99997945582178
-99999939031895
-99999823995894
-99999811691485
-99998981213237
-99999833511460
-99998222679302
-99998702523709
-99998897366810
-99998902712422
-99999004978169
-99997887933247
-99998444009064
-99999688875437
-99998279656293
-99999478206713
-99998709501491
-99998296613572
-99997949405274
-99999758754261
-99999001081200
-99999920134839
-99999449161019
-99998247383855
-99998712670105
-99999402897663
-99998693328830
-99998198485052
-99999691741659
-99998167419232
-99999174200291
-99999664448937
-99998125460621
-99998660081298
-99998667161969
-99998000121135
-99998568025440
-99998196887928
-99998658631162
-99999228028548
-99998916235291
-99999804655968
-99999497084852
-99998330023112
-99998587061016
-99999536624384
-99999646147084
-99999417997005
-99999411000783
-99998498299817
-99998277915770
-99999055375233
-99999373608252
-99998060278160
-99998291927461
-99999419418079
-99999081981786
-99998218275533
-99999480616876
-99998095636199
-99998742690916
-99998588645284
-99998271744158
-99999370050197
-99998811700013
-99999622329450
-99998621426818
-99999265247430
-99999448700908
-99999435971750
-99998652201130
-99998599379968
-99999960061260
-99998242265089
-99999668393874
-99998107714789
-99998612223828
-99999110176342
-99998235244158
-99999636492277
-99999169634169
-99998634522421
-99998141952035
-99998212213652
-99999390615262
-99999201190138
-99999562096835
-99999271897891
-99999725549043
-99999121290434
-99998903884486
-99997908758347
-99998789054579
-99999594974482
-99998346014852
-99998860246262
-99999642285469
-99999574973009
-99999066703706
-99998028759517
-99998649277910
-99999359174615
-99999530031851
-99998450114985
-99998987548019
-99999992869740
-99999360573488
-99999617307102
-99999008758242
-99998344292348
-99999517403520
-99998672421955
-99998294464248
-99998525630811
-99999136843576
-99997896711008
-99998304560621
-99999220355033
-99999422728042
-99999470549440
-99998567223956
-99999023750279
-99998212913899
-99998531776700
-99998437674261
-99998770347123
-99999960852925
-99998816195395
-99999875976258
-99999250820975
-99999150252509
-99998689206869
-99998804310863
-99999864139345
-99998535808174
-99999295861357
-99999748927126
-99998470203848
-99997900283491
-99998500423520
-99998746192177
-99999770102626
-99999630683592
-99998628125331
-99998344876428
-99998765187663
-99997867602493
-99998426698841
-99998296897747
-99999017791514
-99999571212371
-99998796818738
-99999338513122
-99998282502332
-99998314211511
-99998030107921
-99998933141429
-99999514891927
-99999429692986
-99998670278772
-99999998113508
-99998096092160
-99999087132053
-99998054918372
-99999419759141
-99997999199935
-99998312110979
-99998835726382
-99998842265718
-99999104535177
-99998801980125
-99999737235535
-99998403435860
-99999092871656
-99999360177220
-99999744098863
-99999923718049
-99997967371007
-99999022606252
99999813482793
99999961883350
99998683284324
99999096329070
99999681399955
99997875090014
99999087349068
99998391801355
99998596433837
99997873320760
99998492465969
99998438068580
99998771478176
99998507928627
99998508399643
99997956539546
99999788394560
99999517652651
99998839071784
99998078938849
99998656078841
99999061479219
99999897163789
99998215803274
99999157123731
99999766736798
99998694326351
99999908046755
99998680458007
99998501806252
99998445274343
99999027397567
99998713015730
99998218253199
99998471491064
99998649956408
99999167513578
99999341307516
99998569278423
99998295080967
99998574265417
99998441969717
99998112534106
99999105758087
99999868563384
99998219478235
99998670471184
99999145790116
99998118083269
99999973917484
99999451195847
99998875499510
99999011284287
99998174476301
99998709363563
99998517258617
99999695225523
99999606003776
99999702751819
99998582407886
99998473599851
99999330140002
99998947332551
99998446993634
99999515635336
99998410264433
99999546580519
99998902856497
99999987179699
99998277142973
99998154744048
99997875928185
99998186883769
99999017936720
99999168906922
99998077598479
99998074457391
99998736168944
99999147980926
99999512506869
99998069407293
99999595745670
99998854772274
99998566284304
99998254299032
99999871610204
99999669586227
99997875325027
99998165296647
99999508787708
99998116153139
99998071061047
99998036269561
99999860355350
99999882786454
99999436652983
99998763223428
99999810159680
99999522848231
99998243015348
99999823614073
99998056286835
99998705918080
99999431344080
99999095690483
99998659851926
99999127636940
99999021600221
99999020751843
99999486583154
99999694648817
99999178920214
99998879959867
99998905081797
99999728902482
99999032282544
99999904015823
99998890890471
99999903865072
99998824285488
99999144460650
99999964467486
99998100060287
99999990673784
99999751448751
99998706678617
99999466683692
99999578374833
99998771468402
99998485183012
99998065579603
99998078852762
99999138672117
99999903651594
99999450721808
99998984672212
99998021122779
99998937056680
99998684459732
99999552359604
99998480009662
99999140550866
99997874678201
99998192322881
99999997076956
99998363148737
99999887037544
99998134097735
99999781728471
99999589275747
99999343892137
99998472643429
99998732317505
99998107408445
99999722634237
99998745256355
99998543921265
99999810881522
99999395515970
99998159759274
99999888792499
99999409558445
99999192826045
99997873858001
99999824635226
99998546749756
99998062425062
99998313829450
99998821208499
99999675946956
99998235877507
99999278995122
99999684029952
99998402251151
99999242707104
99998379796517
99998688841566
99998367032195
99998822239597
99998559367476
99998055583172
99999185781784
99998413004730
99997918605019
99999555176440
99998280261961
99999539009829
99999382350408
99999478276411
99999780627014
99998956515570
99998606955843
99998792676110
99999259621833
99999357558003
99998108044792
99998102455974
99998641164621
99999168394844
99998285937421
99999834822764
99998165642753
99999327784853
99998332066959
99999886053084
99997994445505
99999121732082
99999994775746
99999673301386
99999223847440
99999971686243
99998363427651
99999692706134
99999147870691
99999033969087
99999427905946
99998155508042
99998658778587
99999521114839
99999015013210
99999690816516
99998324315455
99998107464968
99999472260392
99999185218696
99999141243291
99999937252157
99999852540533
99999257547305
99998821365981
99999797246245
99999246015697
99998345424651
99998381926219
99998463213482
99998031433957
99999326838374
99999823078633
99999323337654
99998301287040
99998092325835
99998097050108
99999692216167
99999728747310
99999277349654
99998685587505
99999182675971
99998807762322
99998163713030
99999303594000
99997937528231
99998115061113
99999010676731
99999288428405
99999482307861
99998584200179
99999008135951
99999572039659
99998217669311
99998068133539
99998971502947
99998920968619
99998916073804
99999022732666
99999878905293
99999786670659
99998212126136
99999735163365
99998064243898
99998185689036
99998388057263
99997861343471
99998350358511
99999685564090
99999326685484
99998465422236
500
-99997876447673
-99998842219971
-99998010264215
-99998702872865
-99998216843249
-99997902807035
-99999160601595
-99999178797699
-99999425830009
-99999916466886
-99999098000598
-99999358332083
-99998892611033
-99998772588209
-99998389830257
-99999891540625
-99998098736704
-99998026209492
-99999963393871
-99998710085046
-99998644818363
-99998280962650
-99999949057196
-99999761670810
-99998213388754
-99999283412918
-99999662856347
-99998298812105
-99999624065447
-99998034840178
-99998830879131
-99999663014542
-99998773440204
-99999241328982
-99998617850034
-99999464547180
-99997963968665
-99998042143142
-99999910074239
-99998861023026
-99999184728369
-99997984090016
-99998770660920
-99999204157686
-99997945582178
-99999939031895
-99999823995894
-99999811691485
-99998981213237
-99999833511460
-99998222679302
-99998702523709
-99998897366810
-99998902712422
-99999004978169
-99997887933247
-99998444009064
-99999688875437
-99998279656293
-99999478206713
-99998709501491
-99998296613572
-99997949405274
-99999758754261
-99999001081200
-99999920134839
-99999449161019
-99998247383855
-99998712670105
-99999402897663
-99998693328830
-99998198485052
-99999691741659
-99998167419232
-99999174200291
-99999664448937
-99998125460621
-99998660081298
-99998667161969
-99998000121135
-99998568025440
-99998196887928
-99998658631162
-99999228028548
-99998916235291
-99999804655968
-99999497084852
-99998330023112
-99998587061016
-99999536624384
-99999646147084
-99999417997005
-99999411000783
-99998498299817
-99998277915770
-99999055375233
-99999373608252
-99998060278160
-99998291927461
-99999419418079
-99999081981786
-99998218275533
-99999480616876
-99998095636199
-99998742690916
-99998588645284
-99998271744158
-99999370050197
-99998811700013
-99999622329450
-99998621426818
-99999265247430
-99999448700908
-99999435971750
-99998652201130
-99998599379968
-99999960061260
-99998242265089
-99999668393874
-99998107714789
-99998612223828
-99999110176342
-99998235244158
-99999636492277
-99999169634169
-99998634522421
-99998141952035
-99998212213652
-99999390615262
-99999201190138
-99999562096835
-99999271897891
-99999725549043
-99999121290434
-99998903884486
-99997908758347
-99998789054579
-99999594974482
-99998346014852
-99998860246262
-99999642285469
-99999574973009
-99999066703706
-99998028759517
-99998649277910
-99999359174615
-99999530031851
-99998450114985
-99998987548019
-99999992869740
-99999360573488
-99999617307102
-99999008758242
-99998344292348
-99999517403520
-99998672421955
-99998294464248
-99998525630811
-99999136843576
-99997896711008
-99998304560621
-99999220355033
-99999422728042
-99999470549440
-99998567223956
-99999023750279
-99998212913899
-99998531776700
-99998437674261
-99998770347123
-99999960852925
-99998816195395
-99999875976258
-99999250820975
-99999150252509
-99998689206869
-99998804310863
-99999864139345
-99998535808174
-99999295861357
-99999748927126
-99998470203848
-99997900283491
-99998500423520
-99998746192177
-99999770102626
-99999630683592
-99998628125331
-99998344876428
-99998765187663
-99997867602493
-99998426698841
-99998296897747
-99999017791514
-99999571212371
-99998796818738
-99999338513122
-99998282502332
-99998314211511
-99998030107921
-99998933141429
-99999514891927
-99999429692986
-99998670278772
-99999998113508
-99998096092160
-99999087132053
-99998054918372
-99999419759141
-99997999199935
-99998312110979
-99998835726382
-99998842265718
-99999104535177
-99998801980125
-99999737235535
-99998403435860
-99999092871656
-99999360177220
-99999744098863
-99999923718049
-99997967371007
-99999022606252
99999813482793
99999961883350
99998683284324
99999096329070
99999681399955
99997875090014
99999087349068
99998391801355
99998596433837
99997873320760
99998492465969
99998438068580
99998771478176
99998507928627
99998508399643
99997956539546
99999788394560
99999517652651
99998839071784
99998078938849
99998656078841
99999061479219
99999897163789
99998215803274
99999157123731
99999766736798
99998694326351
99999908046755
99998680458007
99998501806252
99998445274343
99999027397567
99998713015730
99998218253199
99998471491064
99998649956408
99999167513578
99999341307516
99998569278423
99998295080967
99998574265417
99998441969717
99998112534106
99999105758087
99999868563384
99998219478235
99998670471184
99999145790116
99998118083269
99999973917484
99999451195847
99998875499510
99999011284287
99998174476301
99998709363563
99998517258617
99999695225523
99999606003776
99999702751819
99998582407886
99998473599851
99999330140002
99998947332551
99998446993634
99999515635336
99998410264433
99999546580519
99998902856497
99999987179699
99998277142973
99998154744048
99997875928185
99998186883769
99999017936720
99999168906922
99998077598479
99998074457391
99998736168944
99999147980926
99999512506869
99998069407293
99999595745670
99998854772274
99998566284304
99998254299032
99999871610204
99999669586227
99997875325027
99998165296647
99999508787708
99998116153139
99998071061047
99998036269561
99999860355350
99999882786454
99999436652983
99998763223428
99999810159680
99999522848231
99998243015348
99999823614073
99998056286835
99998705918080
99999431344080
99999095690483
99998659851926
99999127636940
99999021600221
99999020751843
99999486583154
99999694648817
99999178920214
99998879959867
99998905081797
99999728902482
99999032282544
99999904015823
99998890890471
99999903865072
99998824285488
99999144460650
99999964467486
99998100060287
99999990673784
99999751448751
99998706678617
99999466683692
99999578374833
99998771468402
99998485183012
99998065579603
99998078852762
99999138672117
99999903651594
99999450721808
99998984672212
99998021122779
99998937056680
99998684459732
99999552359604
99998480009662
99999140550866
99997874678201
99998192322881
99999997076956
99998363148737
99999887037544
99998134097735
99999781728471
99999589275747
99999343892137
99998472643429
99998732317505
99998107408445
99999722634237
99998745256355
99998543921265
99999810881522
99999395515970
99998159759274
99999888792499
99999409558445
99999192826045
99997873858001
99999824635226
99998546749756
99998062425062
99998313829450
99998821208499
99999675946956
99998235877507
99999278995122
99999684029952
99998402251151
99999242707104
99998379796517
99998688841566
99998367032195
99998822239597
99998559367476
99998055583172
99999185781784
99998413004730
99997918605019
99999555176440
99998280261961
99999539009829
99999382350408
99999478276411
99999780627014
99998956515570
99998606955843
99998792676110
99999259621833
99999357558003
99998108044792
99998102455974
99998641164621
99999168394844
99998285937421
99999834822764
99998165642753
99999327784853
99998332066959
99999886053084
99997994445505
99999121732082
99999994775746
99999673301386
99999223847440
99999971686243
99998363427651
99999692706134
99999147870691
99999033969087
99999427905946
99998155508042
99998658778587
99999521114839
99999015013210
99999690816516
99998324315455
99998107464968
99999472260392
99999185218696
99999141243291
99999937252157
99999852540533
99999257547305
99998821365981
99999797246245
99999246015697
99998345424651
99998381926219
99998463213482
99998031433957
99999326838374
99999823078633
99999323337654
99998301287040
99998092325835
99998097050108
99999692216167
99999728747310
99999277349654
99998685587505
99999182675971
99998807762322
99998163713030
99999303594000
99997937528231
99998115061113
99999010676731
99999288428405
99999482307861
99998584200179
99999008135951
99999572039659
99998217669311
99998068133539
99998971502947
99998920968619
99998916073804
99999022732666
99999878905293
99999786670659
99998212126136
99999735163365
99998064243898
99998185689036
99998388057263
99997861343471
99998350358511
99999685564090
99999326685484
99998465422236
-1
2
1 4
-1
3
1 4
-1
101
100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 
100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 
100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 
100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 
100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 
-1
7
1 2 5 4 6 7
-1
499
-435212864 976595927 -587761057 479543780 905844795 -357865704 417335977 423884417 -145179170 -921585596 -751635873 931035439 -274038524 415852616 -353302929 515256134 -54902793 -590318023 888335426 961298263 -640574367 -425792774 -560846298 57617979 459418314 -150226426 921061838 -267325146 -5196894 -28186987 384997057 37053378 -577763523 656184144 -679514225 117159239 -845970885 -196379856 -468331823 -516084765 806388160 -737136786 -533203639 -487053272 700317967 -541966771 22472181 780071288 951740289 -356733392 -115286574 -734818580 249571087 88639088 -66310671 72756443 -383580098 917366757 545851892 -689211089 -462697321 -749374896 334753981 -72047819 -976445960 811101915 -639805130 387281231 266701229 737001514 492007072 725901594 -976473314 605090464 320176588 -811733796 514166957 148398383 858550219 247943581 983658606 188098627 -693381025 368853239 -138337950 116776017 313479261 505110290 -138070283 -653811153 -523398211 -288250951 -27060370 750786820 756590676 339912825 -906495642 493838608 134410056 502454000 164455160 -358515049 279818023 587780252 854505739 113244412 450722958 597684199 -191960597 -200456132 57015845 722000361 -378990885 -484917025 717875266 -5778580 51085869 636990420 -216679769 -300033895 322062149 -425683362 22722121 711444158 18234903 -819834926 -297928958 111654802 404499064 222281990 -935404102 584577815 2431165 -253924479 809507579 -191784017 -308212812 -461476473 -662980776 979649293 243164741 -679325254 673479840 341756234 -373485702 -992399720 -464696083 671335139 863755922 -745949765 -780977997 -650490061 893590803 -217950536 -257438902 412810244 -376494340 -82044382 -210894839 -687711131 -131802986 592096750 208385693 40286439 922381750 -744926184 227669665 563110411 -374429322 738909642 -261664696 -74731590 -148389154 -484041793 -892780389 -220947215 376781258 -417359914 153764955 -609063796 -274565964 781830317 -758046510 -203209968 -315083169 536055396 213167727 261151236 -847022395 -99919025 847206089 440607650 -808687203 221707127 -13126477 -343538080 252811968 84061473 -855713848 112466496 -358310118 271419332 -224795024 698510825 -961982596 12201615 -302262855 -715136831 -443954845 -419117281 592614730 -932881470 -241203267 96207106 -245022219 638544971 -609117246 288555487 182364603 -936736304 134736805 42553237 -691684785 669984585 461429891 933147354 427809824 741452565 -605152374 -66835775 -775721033 802675345 284556123 -823063966 673642702 638417424 683562682 790062073 -156120897 919511983 -893823368 -575171113 950901680 572285465 24399163 -704019868 65732833 161038028 -371334216 -805469259 88292901 616971075 -624862022 -551852178 397605545 -3515085 -740710581 -767163701 -86738708 -127031880 439820859 -512011962 701944718 245653404 321320190 47270952 37386827 -241553498 -188622253 356880751 -851277931 -23844082 -125404418 781431458 508585533 -386088276 -837587796 -239757601 621561497 -353520584 376107712 624131415 -275576444 -724909459 495435877 -781505452 -464051820 -30148081 -377770255 -419318780 -334843926 899227914 931146812 353913424 -175921 138688411 -166185224 -953032850 -2702444 425975321 216814121 -833307580 -409404870 86349823 893895165 -308908307 -652929096 173742711 244810815 -149223644 -458100439 -500601137 -868225381 -400847674 844858466 810284554 384484874 543407015 83602367 721004996 410519484 -219448415 245966627 -463445279 674551402 -462428385 -794249982 -855290114 -780053262 -633446359 418207703 -194838013 -616486047 -426616427 49892431 -375595398 772716551 368187652 -392117463 -694594315 -201685796 941206303 860480494 -640046647 -250638111 274136264 -764109813 -693883730 -119378931 956919271 -900970681 -522993345 -118239685 -736264344 -279080532 -213130779 198152322 -542587998 -529385813 710505790 -234565031 296362759 845416920 -83144827 343248479 -24504562 970276546 639667590 304968551 232783696 -565039313 -458136156 725027993 -992703407 434143203 410541553 -937956339 136789917 620081649 -709581297 -532028916 -413869292 686902056 -882580897 453140497 285277255 611030934 750143076 -231263581 386705665 192036262 361842146 -17718730 805698993 186449448 -665159738 676626787 -713277834 -469059583 852329435 538697921 218161228 818360668 664533366 -891593804 -980307362 24554021 741463753 578436847 -833101516 -663776451 688463507 592186871 466550941 751921204 -882576573 904801832 885440179 193681873 -421249888 84406895 436945860 -447789285 869154842 -557819926 46323471 -774214391 -591776096 429326943 584609721 800812883 -720836095 902577188 -958148550 -400003017 926503941 753008847 853554899 117095372 -577254565 522413547 753927326 -79059286 -849733280 -539377020 644918868 -600435831 -949542022 -612105598 498718498 -844060806 -991180573 -666588079 -541791999 60812740 867561316 -615862813 -904378729 -598858786 687151760 -506626409 354023884 -22299074 -792955462 133204588 718729159 788449321 -945916709 -84186777 492241105 45983727 929621451 -33222173 -384701681 90078881 132761995 983583052 -584803186 621730054 -868302910 -859976714 -558263192 542212179 353709801 848715496 -641258755 69765805 268817735 38092907 -465997354 -541237765 -668472355 -989172122 -462777507 901021783 -924929555 -995022431 566150394 
-1
5
100000000000000 1010120212102102 10101021000 101021021021
-1
10
-4 -7 -2 -9 -11 -37 -187 -1500 -8 -22
-1
10
2 6 8 5 2 7 -3 0 -1 14
-1
7
99999999999999 -99999999999998 99999999999997 0 -1 5
-1