metya 1 месяц назад
Родитель
Сommit
d32049e2ba
6 измененных файлов с 1191 добавлено и 1 удалено
  1. 1 1
      aoc2025/aocutils.py
  2. 64 0
      aoc2025/day8/README.md
  3. 0 0
      aoc2025/day8/day8.go
  4. 106 0
      aoc2025/day8/day8.py
  5. 20 0
      aoc2025/day8/example.txt
  6. 1000 0
      aoc2025/day8/input.txt

+ 1 - 1
aoc2025/aocutils.py

@@ -95,7 +95,7 @@ def bench(part):
 
 
 if __name__ == "__main__":
-    day = 7
+    day = 8
     root = os.path.dirname(__file__)
     task_dir = os.path.join(root, f"day{day}")
     generate_readme(task_dir, day)

+ 64 - 0
aoc2025/day8/README.md

@@ -0,0 +1,64 @@
+--- Day 8: Playground ---
+-------------------------
+
+Equipped with a new understanding of teleporter maintenance, you confidently step onto the repaired teleporter pad.
+
+You rematerialize on an unfamiliar teleporter pad and find yourself in a vast underground space which contains a giant playground!
+
+Across the playground, a group of Elves are working on setting up an ambitious Christmas decoration project. Through careful rigging, they have suspended a large number of small electrical [junction boxes](https://en.wikipedia.org/wiki/Junction_box).
+
+Their plan is to connect the junction boxes with long strings of lights. Most of the junction boxes don't provide electricity; however, when two junction boxes are connected by a string of lights, electricity can pass between those two junction boxes.
+
+The Elves are trying to figure out *which junction boxes to connect* so that electricity can reach *every* junction box. They even have a list of all of the junction boxes' positions in 3D space (your puzzle input).
+
+For example:
+
+```
+162,817,812
+57,618,57
+906,360,560
+592,479,940
+352,342,300
+466,668,158
+542,29,236
+431,825,988
+739,650,466
+52,470,668
+216,146,977
+819,987,18
+117,168,530
+805,96,715
+346,949,466
+970,615,88
+941,993,340
+862,61,35
+984,92,344
+425,690,689
+```
+
+This list describes the position of 20 junction boxes, one per line. Each position is given as `X,Y,Z` coordinates. So, the first junction box in the list is at `X=162`, `Y=817`, `Z=812`.
+
+To save on string lights, the Elves would like to focus on connecting pairs of junction boxes that are *as close together as possible* according to [straight-line distance](https://en.wikipedia.org/wiki/Euclidean_distance). In this example, the two junction boxes which are closest together are `162,817,812` and `425,690,689`.
+
+By connecting these two junction boxes together, because electricity can flow between them, they become part of the same *circuit*. After connecting them, there is a single circuit which contains two junction boxes, and the remaining 18 junction boxes remain in their own individual circuits.
+
+Now, the two junction boxes which are closest together but aren't already directly connected are `162,817,812` and `431,825,988`. After connecting them, since `162,817,812` is already connected to another junction box, there is now a single circuit which contains *three* junction boxes and an additional 17 circuits which contain one junction box each.
+
+The next two junction boxes to connect are `906,360,560` and `805,96,715`. After connecting them, there is a circuit containing 3 junction boxes, a circuit containing 2 junction boxes, and 15 circuits which contain one junction box each.
+
+The next two junction boxes are `431,825,988` and `425,690,689`. Because these two junction boxes were *already in the same circuit*, nothing happens!
+
+This process continues for a while, and the Elves are concerned that they don't have enough extension cables for all these circuits. They would like to know how big the circuits will be.
+
+After making the ten shortest connections, there are 11 circuits: one circuit which contains *5* junction boxes, one circuit which contains *4* junction boxes, two circuits which contain *2* junction boxes each, and seven circuits which each contain a single junction box. Multiplying together the sizes of the three largest circuits (5, 4, and one of the circuits of size 2) produces `40`.
+
+Your list contains many junction boxes; connect together the *1000* pairs of junction boxes which are closest together. Afterward, *what do you get if you multiply together the sizes of the three largest circuits?*
+
+--- Part Two ---
+----------------
+
+The Elves were right; they *definitely* don't have enough extension cables. You'll need to keep connecting junction boxes together until they're all in *one large circuit*.
+
+Continuing the above example, the first connection which causes all of the junction boxes to form a single circuit is between the junction boxes at `216,146,977` and `117,168,530`. The Elves need to know how far those junction boxes are from the wall so they can pick the right extension cable; multiplying the X coordinates of those two junction boxes (`216` and `117`) produces `25272`.
+
+Continue connecting the closest unconnected pairs of junction boxes together until they're all in the same circuit. *What do you get if you multiply together the X coordinates of the last two junction boxes you need to connect?*

+ 0 - 0
aoc2025/day8/day8.go


+ 106 - 0
aoc2025/day8/day8.py

@@ -0,0 +1,106 @@
+import os
+import math
+
+with open(os.path.join(os.path.dirname(__file__), "example.txt")) as example:
+    example_data = example.read().splitlines()
+
+with open(os.path.join(os.path.dirname(__file__), "input.txt")) as example:
+    input_data = example.read().splitlines()
+
+
+def bench(part):
+    import time
+
+    def wrapper(*args, **kwargs):
+        start = time.perf_counter()
+        value = part(*args, **kwargs)
+        print(f"\tevaluation time: {time.perf_counter() - start} s")
+        return value
+
+    return wrapper
+
+
+def cluster_by_distance(points, max_links=None):
+    """
+    points: list of list shape 3
+    returns cluster as a dict, each cluster – list if index of points
+    """
+
+    n = len(points)
+
+    # collect edges/distances
+    edges = []
+    for i in range(n):
+        x1, y1, z1 = points[i]
+        for j in range(i + 1, n):
+            x2, y2, z2 = points[j]
+            dx = x1 - x2
+            dy = y1 - y2
+            dz = z1 - z2
+            dist = math.sqrt(dx * dx + dy * dy + dz * dz)
+            edges.append((dist, i, j))
+
+    edges.sort(key=lambda e: e[0])
+    max_links = len(edges) if not max_links else max_links
+
+    # Union–Find (DSU)
+    parent = list(range(n))
+    rank = [0] * n
+
+    def find(x):
+        while parent[x] != x:
+            parent[x] = parent[parent[x]]
+            x = parent[x]
+        return x
+
+    def union(a, b):
+        ra, rb = find(a), find(b)
+        if ra == rb:
+            return False
+        if rank[ra] < rank[rb]:
+            parent[ra] = rb
+        elif rank[ra] > rank[rb]:
+            parent[rb] = ra
+        else:
+            parent[rb] = ra
+            rank[ra] += 1
+        return True
+
+    # just walk through the edges
+    links_done = 0
+    for dist, i, j in edges[:max_links]:
+        if union(i, j):
+            last_pair = i, j
+            links_done += 1
+
+    # collect clusters
+    clusters = {}
+    for i in range(n):
+        r = find(i)
+        clusters.setdefault(r, []).append(i)
+
+    return clusters, links_done, last_pair
+
+
+def part1(data, n):
+    from functools import reduce
+    from operator import mul
+
+    points = [list(map(int, point.split(","))) for point in data]
+    clusters, _, _ = cluster_by_distance(points, n)
+    result = reduce(mul, [len(c[1]) for c in sorted(clusters.items(), key=lambda x: len(x[1]), reverse=True)[:3]])
+    print(f"Part1: {result}")
+
+
+@bench
+def part2(data):
+    points = [list(map(int, point.split(","))) for point in data]
+    _, _, last_pair = cluster_by_distance(points)
+    result = points[last_pair[0]][0] * points[last_pair[1]][0]
+    print(f"Part2: {result}")
+
+
+part1(example_data, 10)
+part1(input_data, 1000)
+part2(example_data)
+part2(input_data)

+ 20 - 0
aoc2025/day8/example.txt

@@ -0,0 +1,20 @@
+162,817,812
+57,618,57
+906,360,560
+592,479,940
+352,342,300
+466,668,158
+542,29,236
+431,825,988
+739,650,466
+52,470,668
+216,146,977
+819,987,18
+117,168,530
+805,96,715
+346,949,466
+970,615,88
+941,993,340
+862,61,35
+984,92,344
+425,690,689

+ 1000 - 0
aoc2025/day8/input.txt

@@ -0,0 +1,1000 @@
+71994,35778,75093
+82167,37071,77413
+4754,63728,96979
+54445,21063,49628
+81903,70257,9474
+14363,96620,18573
+31840,82183,13766
+63681,46923,62713
+31013,31805,69488
+99448,80725,73798
+5601,56210,93894
+39459,52488,94479
+46747,31615,78074
+63178,13495,48079
+41228,18436,25201
+37228,92893,65417
+88603,80657,19501
+6974,53388,17916
+82874,48996,68468
+64173,49941,42807
+31385,63794,35924
+97902,87129,19646
+46687,20056,58330
+39797,60196,80437
+5542,26560,39499
+333,99813,75950
+96665,6635,98048
+63295,147,27953
+11083,19279,29061
+26483,43786,83109
+64099,2219,22579
+90139,73677,33352
+48084,71271,8355
+88422,66640,23393
+79668,34793,24134
+43067,39748,86026
+87201,90506,34233
+53748,10984,84723
+7096,62425,27955
+92593,46491,27215
+90367,9694,75318
+3758,38647,86305
+78855,76531,91884
+1257,89940,30419
+74072,54615,5366
+33727,43771,39090
+16378,74263,85799
+62779,2708,21723
+34766,62222,59979
+16902,22779,46050
+21545,2706,1522
+3702,59996,44090
+63733,60257,43295
+28613,45554,43335
+3506,79864,1577
+88914,660,50410
+13902,64044,23735
+25937,88103,41256
+28928,68748,48460
+64626,31360,46770
+25819,94470,19549
+37567,20405,77152
+77018,8834,62981
+30331,67401,64343
+18127,60763,58632
+3730,7835,91559
+38906,85958,49826
+95262,68093,59204
+28469,36463,39346
+37508,55173,77733
+18428,69480,45865
+1725,24691,72895
+94398,33260,4783
+56938,59423,92730
+85698,40689,97700
+86926,30404,10839
+66646,8376,30272
+66461,13063,8390
+72224,35625,51604
+73042,3748,43702
+86344,32610,69771
+81249,20467,92278
+16247,89434,43953
+80761,95811,21079
+56588,70686,91210
+77752,25457,53835
+7471,89075,52515
+30613,9884,24766
+31162,48155,82536
+87310,51771,48474
+2792,61843,7984
+46773,17229,27277
+99371,81885,31154
+499,95878,73643
+98928,74065,56792
+95235,8672,61942
+96627,58503,70187
+21109,84438,3955
+37302,17041,6971
+49549,68802,35092
+32690,48433,69388
+58319,78866,28273
+62818,75481,11168
+77420,62897,4657
+31086,26257,99020
+11264,25151,67660
+66560,21423,38412
+17231,48830,28634
+77897,31676,57335
+24090,67359,59381
+66456,47703,38142
+68791,53896,21713
+10680,92667,70746
+43745,63125,95849
+46731,48189,96791
+53825,24382,99044
+49284,53550,17965
+23815,14855,57765
+11898,95132,55057
+21934,72165,87443
+1393,8231,11472
+91980,3281,94256
+63152,40399,80126
+42878,14490,30683
+24246,52347,81228
+47308,33160,88338
+71626,39230,44727
+58520,60279,46175
+8672,99359,34483
+17142,63162,29201
+74818,30213,37960
+82787,17822,24072
+76644,83653,23329
+77394,42972,61946
+28965,99920,41513
+67545,36156,20145
+64414,19843,98186
+99572,56045,35557
+3722,67234,30028
+70721,96727,34044
+51142,39840,93949
+12701,12851,48590
+47511,71672,62873
+11850,16619,92485
+59,68671,17763
+67892,39345,43934
+96682,78493,4394
+13113,32388,60239
+3647,74014,38681
+31900,2270,15849
+62349,86370,54414
+51817,99964,72795
+75294,73142,23191
+57265,36121,18314
+41750,61615,65256
+86151,65474,45150
+52254,61392,93906
+29337,26557,49730
+51096,26314,26310
+20247,51902,38030
+74617,37759,87255
+52620,37891,98561
+22466,1113,83945
+99430,33345,12385
+74186,12319,48325
+43533,85382,73200
+5089,81192,40703
+41865,71721,36122
+48454,45531,74952
+56319,69400,79878
+41482,95465,11797
+30110,8225,14597
+47196,66958,29028
+912,42319,19827
+80067,32894,63330
+84790,94991,43717
+62066,68662,90463
+62808,40170,33180
+40002,89814,80638
+93466,31181,56748
+68801,51723,80711
+7338,10635,46707
+61680,1256,18075
+59486,15299,82782
+23693,386,19400
+25272,23806,76788
+81440,25560,25565
+98623,23887,15934
+93415,62006,64123
+39703,90037,81834
+33971,92613,80540
+43335,80730,23629
+93606,58907,82524
+61076,94012,50496
+56434,44082,35445
+5527,44267,93927
+6095,54629,4229
+18814,10538,96503
+88702,61025,15953
+5948,40803,33989
+27775,37915,32447
+64018,6124,18206
+2023,17012,29333
+50906,33067,12936
+2059,86625,69856
+83156,72857,73115
+59973,19518,7831
+41656,86437,75313
+83771,86038,37027
+71953,44714,34787
+10282,20124,71449
+46992,76207,98729
+63572,24602,64731
+30945,30030,2923
+12020,25515,36847
+81364,39338,98311
+12368,89925,2284
+78290,61446,56645
+31154,21952,73859
+77165,82533,88404
+19935,70861,54816
+54922,31858,96763
+48448,10782,54158
+56038,7807,50037
+75917,12270,93578
+75207,2825,53745
+50422,21557,94278
+17498,48090,52436
+42511,8850,48776
+60929,52830,24786
+48321,31804,50225
+18582,33514,74437
+74187,97146,16657
+75083,74849,93395
+46976,42679,16574
+2320,46576,32546
+64681,61192,87164
+37120,44907,18392
+68645,81461,48771
+99688,8159,67269
+19735,423,19860
+74750,10859,13095
+3491,73604,3639
+25467,50897,68051
+26454,78683,81552
+25937,99249,69355
+83717,27154,55984
+76493,40206,34714
+88207,32818,75376
+4570,99901,81076
+61573,33591,36183
+26773,53011,13971
+25250,38083,77354
+45647,65524,47049
+59655,24250,67467
+70432,61,2716
+74131,17316,90891
+41197,96015,58929
+76170,47583,96829
+55674,8285,44069
+7951,20391,93505
+12159,63834,25146
+87133,96786,79647
+62706,67021,31248
+9807,61187,93281
+59050,63625,30736
+34698,21184,26558
+30430,86562,81365
+64807,69529,18394
+25306,32639,63961
+16913,79784,68499
+22081,43279,4189
+53843,25791,13257
+51098,21025,47684
+63858,27493,70091
+22509,64994,7309
+83158,93932,14620
+6468,86191,33742
+61236,79364,86388
+80478,88984,91365
+26688,44594,83897
+64491,22510,55919
+51504,46424,38256
+91120,47343,68882
+88172,70518,5150
+6568,7077,87736
+39475,28053,87748
+66921,68053,14609
+63141,91531,47009
+70915,70232,28654
+62199,35491,48640
+72605,41101,30368
+38891,41894,80356
+44981,73358,1825
+58622,93208,25998
+19858,76902,94235
+66454,37829,39034
+25193,69189,11129
+23245,58788,61041
+93614,67189,3288
+60898,63319,79166
+90754,15649,89732
+28310,36454,67758
+41736,57686,6446
+84981,55865,3003
+58771,33025,9000
+2964,58066,1266
+25519,17354,34239
+81751,56102,58227
+57813,17078,79545
+16005,21329,45891
+37937,73915,45443
+90686,33407,44529
+7133,14399,7094
+94952,16256,65759
+30377,11567,35930
+92095,58536,70485
+55442,8705,98246
+50817,25039,20250
+94763,49418,56878
+18977,50699,18378
+82021,71716,96142
+60753,39694,20329
+66123,41838,11626
+83939,34346,28986
+14334,74333,56444
+84139,28278,34282
+98138,41698,91321
+31381,46470,97405
+70534,93811,10281
+69050,70579,48933
+20259,19790,47556
+18131,1846,32961
+96889,61990,55201
+11834,34504,46721
+76052,37578,17990
+86521,56780,37935
+73713,85990,37486
+2030,35772,73033
+27381,73181,31528
+45352,84598,81428
+98202,4508,51077
+56213,6908,80612
+63477,22813,39826
+50620,52946,14653
+87215,74371,59053
+78907,42094,48430
+96285,61283,99037
+49280,56326,94537
+51268,78695,14000
+96345,7466,66749
+38602,88007,61276
+46464,31439,54133
+75947,11024,2377
+72937,41642,54836
+27186,563,10625
+96580,59196,4781
+66507,81524,95512
+22438,78058,65374
+63689,90680,79758
+29316,19668,48873
+3241,59723,53916
+71308,13391,23567
+38712,10635,26048
+66475,15318,68991
+61517,72529,92215
+74143,18574,28590
+82717,97709,785
+89647,56999,83452
+43220,11384,76231
+47413,39487,833
+47931,5729,62003
+92420,26360,87655
+72276,24328,40888
+3576,91223,16399
+81179,83675,15134
+15909,90116,51036
+32453,19367,4255
+81819,96140,18001
+54517,69148,738
+80226,65725,609
+81597,37697,17806
+81659,13999,1700
+1023,58748,24157
+5713,86016,81839
+3776,57824,61753
+82066,29902,36006
+72475,57280,56789
+70498,11504,57576
+54679,14070,35190
+41146,99253,93753
+25686,44809,56486
+90852,14447,45564
+91409,91117,39000
+12055,50360,48790
+29521,85660,8452
+88852,46692,38288
+34956,36629,32495
+21217,45854,75780
+6516,10347,85893
+40503,84516,26987
+2014,99079,7145
+49308,39934,70168
+15195,52443,59218
+74623,65753,20034
+26202,91343,49418
+47029,5131,90337
+92599,13499,35912
+27775,37488,7980
+11281,31510,13637
+42791,60425,89951
+4277,54327,12545
+98114,73556,60557
+68990,61324,41025
+42927,12088,15955
+51124,88191,42128
+87429,99420,20178
+70012,65771,6265
+45219,24392,68485
+11767,46564,20704
+67481,44082,81076
+11097,51852,53330
+40210,3867,60297
+24852,40902,37641
+57152,83377,60376
+87253,13734,70977
+41961,97129,43896
+49928,92142,5330
+89367,22026,97979
+72313,49168,19924
+99465,37405,48688
+67158,4920,31203
+81173,1308,85416
+1203,68531,40627
+93643,2222,53420
+56385,35573,43431
+82270,493,62407
+23402,67576,12353
+23290,25297,60949
+63362,504,24905
+50985,97726,38121
+51465,20072,19102
+45189,23896,68216
+48334,92480,24437
+46613,59084,24484
+88972,55744,78065
+89096,20769,29353
+87059,78702,68596
+24243,77459,58181
+92983,94743,18960
+58,81630,49045
+87898,32677,42979
+25889,15698,38777
+77274,46761,30172
+75479,89004,57189
+70985,55425,551
+76664,22018,67030
+61820,99688,57368
+80632,27327,89078
+91621,99333,13782
+49902,38878,57602
+26294,79883,57022
+38123,88384,35788
+4489,85055,64437
+144,95013,8777
+77189,57542,62997
+48669,97218,12967
+67338,33559,86064
+75024,85860,6874
+97827,43322,7744
+1192,89455,53405
+56212,91946,51126
+8615,63211,79027
+41442,16196,9904
+53078,55367,83330
+52968,39631,89168
+7816,68700,63160
+76827,80755,66476
+27760,64580,23907
+90685,59453,81261
+87419,22819,68710
+24474,27874,49885
+33763,32150,35800
+82526,21396,87933
+45027,76112,5791
+10976,12965,34713
+4097,76555,35690
+4178,63857,75351
+49745,93855,39464
+44818,64011,2771
+17104,45967,70688
+75794,58012,39670
+60116,27644,53727
+66514,36280,60916
+32663,8138,19894
+71182,40938,12100
+75863,93992,90808
+79700,98843,60978
+34065,31148,92165
+14761,64926,86201
+34296,93773,84588
+93367,16491,61101
+97933,46233,73746
+77878,49878,82096
+7445,37535,15303
+33194,96145,97193
+11029,13180,15394
+95777,12351,66676
+87666,2966,99403
+84512,79927,31205
+82193,15312,73835
+85628,17396,60471
+88211,59351,27505
+75927,15851,78401
+14366,73680,98406
+99922,57555,98593
+50491,96741,44854
+82918,24204,62335
+70895,60109,90242
+23321,92901,60430
+84061,96397,63623
+49445,3082,6897
+93658,94507,41862
+44518,83348,17892
+59828,55245,21476
+83935,4496,7694
+69749,63882,71054
+67288,42260,69737
+96242,16549,84067
+67914,35239,67595
+47129,96632,99872
+80813,31925,66512
+85207,77631,94268
+21708,40009,75882
+26521,55822,50821
+82464,86364,91047
+85586,13485,22571
+45254,52505,29044
+2111,86375,65105
+34993,75274,39433
+2368,22774,82028
+3291,20936,60524
+43162,12832,17529
+72763,41200,60222
+77037,24743,58815
+55550,43717,72963
+44489,52979,58250
+31172,37289,11040
+46275,96348,33464
+63625,78704,60782
+78476,96946,50429
+22357,38452,4356
+11911,77798,46701
+98811,3005,13992
+44033,27174,65734
+85897,78511,53009
+83728,10333,1747
+58378,11740,1353
+77939,90086,15839
+2588,99945,23214
+60276,26176,7420
+92595,12933,17457
+7398,10530,30189
+23967,72118,32520
+51813,40206,4678
+89867,35208,23885
+25584,92588,79555
+71703,5318,34127
+97798,4091,95446
+43020,47086,28603
+47330,19822,5705
+34961,39314,40679
+11297,63912,4953
+73888,46368,94550
+93056,41151,63011
+6408,30310,11121
+90128,3992,66359
+65889,19122,91621
+85202,59526,44299
+68930,73718,46407
+63766,84634,64320
+2246,67183,54587
+62974,75350,35625
+75413,42940,74134
+13555,66656,18037
+30375,36263,61156
+4501,38748,81302
+58028,67627,857
+77893,16926,16475
+37126,42706,32178
+27676,39802,98008
+95773,26533,43693
+73201,68080,41404
+83698,43060,92646
+45265,86500,35494
+48641,58223,31585
+63657,52534,66553
+89183,37571,34871
+10210,51310,69767
+2659,52228,70192
+59378,91439,3248
+85690,65926,40929
+73688,91230,34853
+35712,38838,64223
+23719,18455,59966
+81283,83526,52034
+22140,87031,51595
+12616,49045,75239
+9040,85764,91974
+36866,90550,98976
+77230,96819,20683
+7436,29314,92311
+98292,95307,69997
+84363,88484,16437
+62237,60703,84203
+69010,16972,5029
+12381,35734,87341
+22847,22758,70462
+23568,28012,71633
+34396,70307,83247
+4007,79085,32279
+30676,21953,3075
+71603,49388,76302
+26420,97762,92757
+24666,99100,67240
+21450,98687,91009
+81557,93347,24783
+72463,99035,59962
+48155,43628,4673
+62922,42980,81729
+94039,12985,20484
+58189,59259,58401
+10262,9795,38543
+26732,22406,93590
+34170,23102,53481
+93406,78558,33952
+77590,94871,53503
+65381,34899,87494
+45663,12914,59248
+58185,62025,39899
+59624,95610,74821
+36506,18124,53451
+16907,43632,91033
+11169,89060,85747
+96220,989,61290
+45118,56165,30655
+74833,84919,3817
+53970,61961,49899
+80611,19639,61423
+26543,90153,47255
+90749,67707,65570
+35136,47956,93622
+56645,34977,17277
+87674,8475,33777
+92343,53825,45525
+54175,59287,86697
+73049,24239,87942
+95702,86583,19861
+6024,93044,34614
+54501,5761,579
+99924,78072,89989
+2409,62145,59783
+72682,95401,33706
+17810,32907,96820
+49842,35348,89545
+11624,62329,70165
+32818,48191,77852
+39914,66764,83117
+82819,3543,90988
+97712,64340,79999
+69799,52122,24907
+57545,99665,89968
+69202,73312,21911
+16428,33846,44938
+24695,6299,23529
+40156,7452,43245
+94021,91002,20648
+85836,88284,25832
+55383,95651,36148
+72720,10336,44581
+90718,14153,59733
+66010,11180,66346
+45434,3004,47640
+52434,11414,87460
+20006,11324,40465
+10867,60988,71696
+74094,99299,59593
+50856,38462,14319
+62991,52336,35764
+75064,83445,15092
+23403,44767,95756
+55133,7167,83082
+77071,71509,41855
+21667,33259,10236
+18471,38476,17625
+78944,34257,52049
+92479,32616,86319
+22858,20949,46624
+4880,78484,34818
+11527,84867,93378
+78974,17650,78765
+74138,28953,3583
+56413,76323,55747
+67549,3759,8677
+31943,44379,39961
+42106,41311,32852
+56297,12010,46644
+81915,79312,88299
+44185,30406,26588
+96225,15259,86100
+11992,33319,39253
+62536,7194,78741
+64911,67887,96091
+15817,28484,26167
+20066,39918,7463
+14104,28246,63688
+64068,23910,59412
+48068,3052,6533
+95422,11212,58266
+26117,20887,15966
+35787,86585,35656
+17064,24951,45536
+77564,63576,16144
+74431,94019,10314
+36527,74353,29299
+78558,1797,29857
+93721,7479,70825
+22209,81944,40607
+2035,27697,90283
+96827,43289,43620
+57455,59469,93596
+73576,6672,29306
+36658,85264,59411
+20142,3130,56949
+32445,35683,78583
+57892,4861,34565
+6339,93118,65604
+40032,84445,26060
+83659,71839,77738
+67839,61789,74485
+45406,59545,65451
+30902,66298,45846
+56087,91426,55145
+43175,92852,10365
+37916,93652,9587
+77076,61402,93495
+80406,4501,76179
+20141,84046,8801
+61745,10488,85424
+81853,73975,69859
+14975,39990,36919
+425,29057,83455
+80234,13359,35893
+40977,29679,42035
+23761,11391,88478
+66565,4758,72222
+32177,32273,6781
+65196,66826,36840
+97223,16854,40786
+40274,88363,23593
+32697,37277,60877
+53689,73662,18527
+98103,62049,69747
+32744,69554,8960
+23397,68764,53182
+42929,69369,81246
+77518,85231,34798
+36802,78190,14233
+54628,12472,49535
+29391,56117,15288
+77825,5431,10593
+41659,34793,68070
+10992,66253,950
+14433,1764,51446
+60096,8509,77899
+36418,37346,38420
+4669,86944,40966
+56932,13103,21682
+1,47984,31807
+21966,99561,35316
+89903,70729,47449
+20167,5447,76532
+36253,9248,98610
+64794,95163,87139
+35328,16172,63470
+70880,14275,4985
+4761,47544,24556
+39677,28206,40690
+71399,11436,83090
+52370,85015,17385
+63268,55505,45957
+7399,55941,58816
+45414,7374,26929
+70279,56281,53644
+86909,52768,90404
+72456,90976,112
+17635,2646,99931
+86174,96084,68871
+65077,22419,22012
+4997,79751,39328
+28036,23358,87579
+18312,4715,54158
+18395,97479,72069
+1723,83334,56877
+2295,99824,47729
+26222,74977,99078
+87629,16436,2646
+95099,48269,40724
+92793,37339,68149
+52621,90176,77856
+61843,82416,66068
+68757,25091,68286
+20691,30996,35006
+63461,84914,80125
+97660,29049,37415
+7782,232,92709
+79775,85240,46518
+46733,59787,86765
+62273,89249,35251
+36518,19063,75882
+52606,76553,86791
+67095,35760,24918
+39251,22707,19983
+46018,90428,79913
+48385,33357,76117
+26669,69287,14549
+42704,46920,22106
+26447,97598,18146
+87815,84410,81488
+11498,63598,33674
+66717,8830,26196
+35677,77096,63858
+96349,10593,78326
+2893,49425,45712
+53983,66982,22053
+43185,66312,26399
+98982,39782,93566
+61117,81066,94208
+33575,60049,7555
+27153,96871,86252
+52206,77175,70020
+26072,21748,27907
+81510,54299,41171
+83571,27493,23907
+17482,49691,23916
+23102,81679,81941
+14744,31325,37852
+30786,34815,72930
+13649,53714,60428
+87698,43826,26082
+73595,62795,8776
+29915,67632,54374
+44463,75972,65513
+48678,85407,45378
+49486,3452,65199
+64656,84639,78696
+91839,32621,92211
+20733,20288,43978
+4961,41269,39961
+36255,39303,21202
+31475,39689,40599
+28499,66145,50938
+88834,10127,18124
+18645,68128,41856
+39828,80725,40205
+95105,39425,11297
+24436,48455,90652
+91388,23447,17573
+28725,67069,36585
+29124,66794,27561
+38275,88199,73388
+57932,56055,73076
+12690,39733,62506
+74907,27448,9032
+156,34414,41628
+54812,65977,34382
+62476,26063,43443
+1790,6783,21866
+42923,88809,87413
+42260,27601,23247
+30369,60458,83601
+24558,15268,15325
+57295,23929,39580
+4557,83359,23654
+28067,30991,44706
+39182,5155,62265
+39510,4815,38584
+54724,51253,73211
+49733,39412,90351
+70776,79322,96488
+86173,71010,39505
+55900,86978,40167
+82629,80898,38474
+10109,44574,71357
+54949,44211,15342
+93001,56492,31344
+27053,98125,32651
+56278,88887,15980
+78313,71142,86992
+44852,73174,41575
+31753,45883,65082
+24199,78079,11874
+86487,38547,82294
+57093,85962,7058
+81052,80878,13983
+96960,87535,85034
+34299,32451,40986
+16935,11236,49608
+24595,93855,47708
+30199,80051,74285
+68656,84718,4949
+71002,28585,79826
+3715,60115,27552
+6756,51861,84096
+99391,98658,15849
+48855,44300,64787
+68600,705,58474
+36004,3770,70608
+43778,40781,69772
+20581,41825,33902
+92200,17632,41490
+14763,15960,76540
+96291,21416,65701
+49207,51131,35392
+68539,10285,95338
+99837,10869,25254
+56143,52682,27011
+3352,93858,28514
+87434,10589,39934
+29048,85591,49757
+78537,38360,45645
+48655,53656,65586
+73238,2535,70618
+57921,49713,47626
+20586,55805,740
+70526,90884,24468
+22363,70397,87273
+42168,55988,16817
+71536,12728,20392
+21770,3564,51053
+729,22778,17355
+25906,29146,98598
+43058,57415,3958
+67979,35109,44258
+14502,13042,1916
+85499,24435,55435
+40996,9794,54779
+63638,93519,18826
+45533,26658,81835
+38964,24654,68488
+42804,47266,47295
+21268,32533,83344
+50182,58453,23303
+35732,89546,97031
+96736,83370,90311
+11920,75045,44752
+61697,69124,83230
+86611,42437,60
+72144,50931,16768
+76156,67143,11447
+80756,39235,15610
+89581,54885,33248
+53744,73483,1779
+21202,77831,53887
+63034,57114,5684
+32243,12027,16442
+38474,90692,82658
+71344,73588,93056
+61589,54879,26951
+51647,44039,39004
+19722,66469,96442
+7924,81097,52047
+9162,16920,53115
+87905,41307,19359
+41804,96141,78321
+36312,13417,67680
+51058,553,78134
+81460,95740,93351
+33740,32199,40164
+7573,43319,36112
+74551,29977,11298
+44995,61318,56616
+89339,13795,57945
+39341,21856,55476
+54966,97423,20700
+56488,34389,42703
+96099,65850,58207
+87667,92174,24012
+10242,88358,2171
+66891,53681,24245
+12658,42076,80015
+18120,34578,63929
+19581,35195,79812
+31657,49056,82848
+23577,68320,30314
+18579,52735,34213
+55147,42518,20389
+8331,66899,38831
+60283,42519,92393
+52021,47406,20079