100
1 1 2 1 1
1 1 3 1 1
2 1 3 1 1
3 1 4 1 1
4 1 4 1 1
100000 1 1000000 1 1
100000 1 9 1 1
100000 1 9454 1 1
100000 1 9455 1 1
500832 1 40181 1 1
500832 1 40182 1 1
524288 1 41871 1 1
524288 1 41872 1 1
930168 1 70677 1 1
930168 1 70678 1 1
930169 1 70677 1 1
930169 1 70678 1 1
930170 1 70677 1 1
930170 1 70678 1 1
930171 1 70677 1 1
930171 1 70678 1 1
947568 1 71846 1 1
947568 1 71847 1 1
999983 1 76000 1 1
999983 1 76000 10000 1
999983 1 76000 10000 2
999983 1 76000 10000 7
999983 1 76000 10000 8
999983 1 76000 1000000 1
999983 1 76000 1000000 2
999983 1 76000 184 2
999983 1 76000 185 2
999983 1 76000 186 2
999983 1 76000 2 1
999983 1 76000 20000 1
999983 1 76000 20000 2
999983 1 76000 3 1
999983 1 76000 4 1
999983 1 76000 5 1
999983 1 76000 75998 1
999983 1 76000 75998 2
999983 1 76000 75999 1
999983 1 76000 75999 2
999983 60920 76000 1 1
999983 60921 76000 1 1
1000000 1 1000000 1 1
1000000 1 2 1 1
1000000 1 3 1 1
1000000 1 4 1 1
1000000 1 5 1 1
1000000 1 75366 1 1
1000000 1 75367 1 1
1000000 1 75368 1 1
1000000 2 75367 1 1
1000000 999997 1000000 1 1
1000000 999997 1000000 1000000 1000000
1000000 999998 1000000 1 1
1000000 999998 1000000 1 1000000
1000000 999999 1000000 1 1
1000000 999999 1000000 1 1000000
175009 1018 9835 5 3
765551 2555 8615 10 2
996437 3184 7782 9 3
577662 187 388 6 4
655447 427 8221 3 6
824805 5119 6090 3 6
324104 2575 8947 4 5
109931 895 6842 8 10
812557 1496 8404 6 1
455019 6577 8294 9 10
645561 377 6778 7 2
167822 5926 6432 1 4
305839 371 5968 4 3
578487 4415 9616 8 7
543049 1155 7329 2 7
217551 2013 8273 8 7
425317 1822 7090 7 10
270162 5742 5784 8 8
512291 2170 9278 7 1
858364 144 279 1 5
148939 3022 5698 2 3
503460 2991 7271 1 2
474686 6728 8744 8 7
380874 2245 6667 5 9
299937 4868 8081 7 3
490960 4961 8767 10 10
951147 2740 9938 5 2
398271 7836 8395 6 7
445357 7979 8938 6 5
930522 5624 6204 9 6
404677 1787 9389 1 7
773172 2559 5314 4 2
946849 9173 9634 5 10
938587 1694 2893 10 7
588614 1775 2285 10 8
183635 2444 2967 7 6
256891 5672 7537 5 4
297201 6608 8073 3 1
597817 2168 4865 7 4
158149 2674 8547 9 7
