Chess Tournament

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Alex organizes a chess tournament in his company. The tournament is a round-robin tournament of nn people, and each pair of players will face each other exactly once.

The problem is, there are only kk chess boards in the office (kn2k \le \frac{n}{2}). So only kk games can be played at the same time. Let's call gg games, being simultaneously played by 2g2g distinct players, where 1gk1 \le g \le k, a round.

Your task is to help Alex to set a schedule with a minimal number of rounds.

입력

The input contains two integers nn and kk (2n200,1kn22 \le n \le 200, 1 \le k \le \frac{n}{2}) --- the number of players and the number of chess boards.

출력

In the first line output an integer rr --- the number of rounds.

Then output rr sections, describing rounds. In the first line of each section, output an integer gg (1gk1 \le g \le k) --- the number of games in this round. Then output gg lines with two integers each --- the pairs of players that will play in this round. All these 2g2g integers must be distinct integers from 11 to nn.

If there are several possible solutions, output any of them.