QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#426840#6502. Disjoint Set Unionegypt_ioi2024_01TL 1314ms82712kbC++203.2kb2024-05-31 22:35:042024-05-31 22:35:05

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3596kb

input:

5
3
1 2 3
2 2 3
4
1 2 3 3
1 1 1 2
5
1 2 3 4 5
2 3 4 5 5
5
1 1 1 1 1
1 2 3 4 5
6
1 2 2 4 5 6
1 1 5 1 4 2

output:

YES
4
1 1 
1 1 
1 1 
2 1 2 
YES
15
1 2 
1 3 
1 4 
1 2 
1 3 
1 4 
1 2 
1 3 
1 4 
2 4 2 
1 2 
1 3 
1 4 
2 2 1 
1 3 
YES
27
1 1 
1 2 
1 3 
1 4 
1 1 
1 2 
1 3 
1 4 
1 1 
1 2 
1 3 
1 4 
1 1 
1 2 
1 3 
1 4 
1 1 
1 2 
1 3 
1 4 
2 1 2 
1 2 
2 2 3 
1 3 
2 3 4 
1 4 
2 4 5 
NO
YES
37
1 2 
1 3 
1 4 
1 5 
1 6 
1...

result:

ok good! (YES count = 4, NO count = 1) (5 test cases)

Test #2:

score: 0
Accepted
time: 552ms
memory: 4128kb

input:

100000
5
1 2 1 1 1
2 2 1 1 2
5
3 2 3 4 1
3 2 3 4 1
5
1 2 3 4 3
1 4 4 1 1
5
1 2 3 5 3
1 2 2 5 2
5
5 2 3 5 5
5 2 3 5 5
5
1 2 3 4 5
5 3 3 4 5
5
1 2 3 4 5
1 4 1 4 4
5
1 2 3 1 5
1 2 3 1 2
5
1 2 3 3 1
1 3 3 3 1
5
1 2 3 4 3
2 2 4 4 4
5
1 2 2 4 5
5 2 2 4 5
5
1 2 1 4 5
5 2 5 5 5
5
1 2 3 4 5
1 2 5 5 1
5
1 4 3...

output:

YES
6
1 1 
1 5 
1 1 
1 5 
2 1 2 
1 5 
YES
0
YES
23
1 2 
1 3 
1 4 
1 5 
1 2 
1 3 
1 4 
1 5 
1 2 
1 3 
1 4 
1 5 
1 2 
1 3 
1 4 
1 5 
2 2 4 
1 4 
2 3 4 
1 4 
1 5 
2 4 1 
1 5 
YES
8
1 3 
1 5 
1 3 
1 5 
1 3 
1 5 
2 3 2 
1 5 
YES
0
YES
12
1 1 
1 2 
1 1 
1 2 
1 1 
1 2 
1 1 
1 2 
1 1 
1 2 
2 2 3 
2 1 5 
YES...

result:

ok good! (YES count = 100000, NO count = 0) (100000 test cases)

Test #3:

score: 0
Accepted
time: 979ms
memory: 3980kb

input:

50000
10
1 2 3 4 5 6 7 8 6 10
1 10 3 4 5 6 7 8 6 10
10
6 2 3 4 5 6 2 5 5 10
6 6 6 6 6 6 6 6 6 10
10
1 2 3 4 7 7 7 10 9 10
9 7 3 9 9 9 9 9 9 7
10
1 2 3 7 4 2 3 8 3 10
2 2 2 2 2 2 2 2 2 2
10
1 2 3 5 5 8 2 8 9 10
2 2 3 5 10 8 2 10 9 10
10
1 8 3 3 5 6 10 8 9 10
5 5 5 5 5 5 5 5 5 5
10
8 2 7 4 5 6 8 8 9 1...

output:

YES
10
1 2 
1 2 
1 2 
1 2 
1 2 
1 2 
1 2 
1 2 
1 2 
2 2 10 
YES
49
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 9 
2 2 6 
1 7 
2 3 6 
2 4 ...

result:

ok good! (YES count = 50000, NO count = 0) (50000 test cases)

Test #4:

score: 0
Accepted
time: 835ms
memory: 3824kb

input:

12500
20
9 2 3 4 5 6 7 8 9 10 11 9 13 14 19 19 17 18 19 20
8 2 3 6 4 6 7 18 18 10 3 8 6 4 19 4 4 4 4 20
20
6 2 3 4 6 15 7 8 9 10 11 12 13 14 15 20 17 18 19 20
12 12 2 8 12 12 7 12 9 12 11 12 13 14 12 8 8 9 8 8
20
5 2 3 4 5 20 7 8 9 10 11 10 13 14 20 16 10 18 19 9
19 19 4 4 19 3 14 8 3 4 3 4 3 14 3 1...

output:

YES
230
1 1 
1 4 
1 5 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 16 
1 17 
1 18 
1 19 
1 1 
1 4 
1 5 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 16 
1 17 
1 18 
1 19 
1 1 
1 4 
1 5 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 16 
1 17 
1 18 
1 19 
1 1 
1 4 
1 5 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 16 
1 17 
1 18 
1 19 
...

result:

ok good! (YES count = 12500, NO count = 0) (12500 test cases)

Test #5:

score: 0
Accepted
time: 615ms
memory: 4164kb

input:

12500
20
1 2 3 4 5 6 7 7 5 10 11 12 13 14 5 16 17 5 19 20
10 3 12 3 3 3 4 12 3 10 3 12 3 3 13 3 11 11 13 2
20
1 2 3 10 5 6 7 13 12 10 11 13 13 13 13 16 17 13 19 20
13 13 3 10 13 13 1 13 13 13 13 13 13 13 13 13 13 13 13 13
20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 9 3 4 17 6 7 19 9 10 1...

output:

YES
335
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 11 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 11 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 11 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1...

result:

ok good! (YES count = 12500, NO count = 0) (12500 test cases)

Test #6:

score: 0
Accepted
time: 761ms
memory: 4224kb

input:

500
100
5 43 3 13 100 6 56 8 9 62 11 82 13 14 15 48 17 76 19 64 35 62 50 77 38 94 35 62 35 30 31 32 48 34 35 36 43 64 39 40 35 42 62 44 45 62 47 62 49 50 62 47 62 62 39 48 20 58 59 60 43 66 19 62 3 66 67 85 69 70 83 28 73 83 100 76 77 80 85 80 81 82 100 84 85 40 20 88 62 90 40 92 93 94 58 96 30 98 6...

output:

YES
5284
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 46 
1 47 
1 48 
1 49 
1 50 
1 51 
...

result:

ok good! (YES count = 500, NO count = 0) (500 test cases)

Test #7:

score: 0
Accepted
time: 547ms
memory: 11100kb

input:

55
300
172 231 135 149 135 297 7 297 236 52 73 114 52 135 15 73 297 97 218 236 52 236 218 73 244 236 73 52 162 218 103 30 214 34 59 36 73 89 44 131 73 73 73 73 73 41 47 32 236 52 248 73 73 54 209 75 57 73 205 151 73 62 73 73 143 141 238 205 106 73 71 128 73 124 75 76 89 231 205 73 149 135 249 135 13...

output:

YES
14149
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50 
1 51 
1 52 
1 53 ...

result:

ok good! (YES count = 55, NO count = 0) (55 test cases)

Test #8:

score: 0
Accepted
time: 546ms
memory: 47244kb

input:

5
1000
794 193 3 4 888 279 316 8 621 679 376 254 791 550 362 706 677 133 133 279 279 57 557 471 780 471 110 557 264 317 557 927 264 908 589 193 481 38 39 941 619 473 683 340 817 780 876 548 557 193 589 648 264 471 940 528 557 710 57 57 61 142 133 481 679 142 712 264 557 264 683 468 679 204 398 754 3...

output:

YES
57323
1 1 
1 2 
1 4 
1 5 
1 7 
1 8 
1 9 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 27 
1 28 
1 30 
1 31 
1 32 
1 33 
1 36 
1 37 
1 38 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 50 
1 51 
1 52 
1 53 
1 54 
1 56 
1 57 
1 59 
1 62 
1 63 
1 6...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #9:

score: 0
Accepted
time: 324ms
memory: 30724kb

input:

5
1000
811 448 371 731 601 6 950 8 731 811 123 688 753 282 15 802 17 282 282 20 272 818 23 24 731 1 805 67 951 753 230 182 629 15 874 36 576 38 113 272 41 811 43 455 282 595 965 836 582 855 811 76 230 50 731 885 811 595 182 969 619 62 688 576 811 944 335 1 944 230 71 42 73 328 11 951 753 10 335 944 ...

output:

YES
119880
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50 
1 51...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #10:

score: 0
Accepted
time: 627ms
memory: 48348kb

input:

5
1000
1 696 3 4 70 98 715 8 174 10 11 12 342 530 15 878 928 191 447 20 21 878 23 436 367 4 174 28 321 666 31 911 33 34 35 526 66 38 39 868 41 440 43 710 45 988 47 48 62 50 383 612 300 569 878 56 84 58 560 60 61 401 63 64 815 647 67 68 69 70 670 72 73 74 75 846 77 784 554 80 208 82 142 84 85 590 87 ...

output:

YES
552447
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #11:

score: 0
Accepted
time: 757ms
memory: 59120kb

input:

5
1000
1 697 3 807 656 548 7 859 9 188 11 194 629 907 319 275 796 18 876 878 21 711 376 82 275 118 27 28 144 30 31 32 878 225 35 795 193 835 39 220 468 509 601 808 569 46 947 871 859 878 228 52 113 697 621 56 319 616 323 572 970 795 98 994 65 853 907 387 69 436 605 835 601 74 762 256 77 78 275 907 5...

output:

YES
331158
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #12:

score: 0
Accepted
time: 960ms
memory: 60436kb

input:

5
1000
1 2 500 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 689 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 452 86 684 88 89 90 91 550 93 94 95 96 97 98 74...

output:

YES
949128
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #13:

score: 0
Accepted
time: 699ms
memory: 53940kb

input:

5
1000
1 2 3 4 5 6 7 69 9 10 11 12 13 14 15 16 17 18 822 423 21 22 23 24 25 26 27 28 29 30 848 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 963 48 49 50 51 52 53 54 672 56 673 58 59 60 868 62 63 64 480 66 67 68 69 941 71 834 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 515 91 92 93 94 95 96 97...

output:

YES
904472
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #14:

score: 0
Accepted
time: 667ms
memory: 47000kb

input:

5
1000
433 256 696 228 253 435 436 725 47 766 308 958 433 851 399 433 258 328 748 435 468 725 982 24 748 157 748 999 958 725 27 553 435 819 139 553 748 304 39 676 289 228 33 725 748 851 811 735 435 47 819 399 531 435 738 191 433 304 559 60 748 800 227 47 982 658 47 586 69 748 991 191 325 107 183 644...

output:

YES
112906
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #15:

score: 0
Accepted
time: 1314ms
memory: 82712kb

input:

5
1000
766 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 592 18 19 20 21 22 230 24 25 26 27 28 29 30 31 32 270 144 35 36 37 105 39 40 180 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 947 61 62 417 64 65 66 67 68 69 70 71 72 73 888 75 76 77 78 79 80 81 82 83 766 85 86 87 214 916 90 91 92 93 94 95 317...

output:

YES
858144
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #16:

score: 0
Accepted
time: 856ms
memory: 66056kb

input:

5
1000
392 897 227 735 327 707 615 226 153 102 593 398 726 696 857 894 17 823 799 322 109 714 931 260 762 823 988 827 799 949 694 916 867 123 398 747 633 367 931 916 231 89 891 44 45 538 938 175 49 376 799 762 960 696 327 327 997 477 726 799 857 714 339 398 916 231 799 68 69 894 71 696 73 255 50 395...

output:

YES
174401
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #17:

score: 0
Accepted
time: 420ms
memory: 44716kb

input:

5
1000
1 702 632 4 5 629 7 8 9 10 713 371 13 14 15 16 17 785 19 20 21 476 23 24 584 26 54 28 29 30 31 32 33 34 35 36 768 239 39 96 809 42 43 44 45 46 47 48 208 50 51 52 53 937 55 56 57 58 59 606 25 62 255 64 65 435 67 68 69 70 70 72 69 564 75 76 615 78 79 255 564 800 537 84 85 86 564 262 89 90 91 92...

output:

YES
609313
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 12 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50 
1 51 
1 53 
1 54 
1 55...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #18:

score: 0
Accepted
time: 547ms
memory: 50040kb

input:

5
1000
167 610 3 858 1 592 201 496 9 10 11 969 13 14 290 705 618 18 19 62 21 22 23 25 25 562 509 28 29 162 31 32 1 502 518 1 906 501 39 40 41 42 43 44 779 17 979 530 49 737 51 52 53 54 55 56 57 779 533 60 61 822 54 64 65 66 509 68 69 562 71 72 73 587 509 76 77 78 848 80 81 723 83 84 142 936 562 868 ...

output:

YES
599795
1 1 
1 2 
1 3 
1 4 
1 5 
1 6 
1 7 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 37 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 49 
1 50...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #19:

score: 0
Accepted
time: 1118ms
memory: 61844kb

input:

5
1000
404 627 3 4 5 6 7 8 9 10 11 12 13 14 693 16 17 18 19 20 221 22 23 24 25 26 27 28 29 30 31 32 33 718 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 986 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 503 551 994 89 495 91 447 93 94 495 96 ...

output:

YES
799152
1 2 
1 3 
1 4 
1 5 
1 6 
1 8 
1 9 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 18 
1 19 
1 20 
1 21 
1 22 
1 23 
1 24 
1 25 
1 26 
1 28 
1 30 
1 31 
1 32 
1 33 
1 34 
1 35 
1 36 
1 38 
1 39 
1 40 
1 42 
1 43 
1 44 
1 45 
1 46 
1 48 
1 49 
1 50 
1 51 
1 52 
1 54 
1 55 
1 56 
1 57 
1 ...

result:

ok good! (YES count = 5, NO count = 0) (5 test cases)

Test #20:

score: -100
Time Limit Exceeded

input:

5
1000
1 2 3 4 5 6 7 8 9 511 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 575 27 28 29 30 31 32 33 34 35 36 37 822 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 804 62 63 64 65 66 67 477 69 70 71 72 73 74 75 76 77 78 79 80 691 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 941 9...

output:

YES
694793
1 1 
1 2 
1 3 
1 4 
1 5 
1 7 
1 8 
1 10 
1 11 
1 12 
1 13 
1 14 
1 15 
1 16 
1 17 
1 19 
1 20 
1 21 
1 22 
1 24 
1 25 
1 26 
1 27 
1 28 
1 29 
1 30 
1 32 
1 33 
1 34 
1 35 
1 36 
1 38 
1 39 
1 40 
1 41 
1 42 
1 43 
1 44 
1 45 
1 46 
1 47 
1 48 
1 50 
1 51 
1 52 
1 54 
1 55 
1 56 
1 57 
1 ...

result: