AtCoder Grand Contest 050 (Good Bye rng_58 Day 1)
A
AtCoder Jumper
AtCoder
⌀ 1973
原题
←B →
翻译中…

Problem Statement

翻译中…

Have you noticed this part of AtCoder website?

翻译中…

image

翻译中…

Here the numbers are carefully chosen so that we can jump from any page to any page in small number of steps, while each page doesn't contain too many links. In this task you are asked to do a similar thing with only two links on each page!

翻译中…

Snuke made a website with $N$ pages numbered $1$ through $N$. For each $i$ ($1 \leq i \leq N$), choose two integers $a_i$ and $b_i$ ($1 \leq a_i, b_i \leq N$), and add two links on Page $i$: a link to Page $a_i$ and a link to Page $b_i$. The website must satisfy the following constraint:

翻译中…
  • You must be able to jump from any page to any other page by clicking at most $10$ links.
翻译中…

Under the constraints of the problem, we can prove that this is always possible.

翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 1000$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

Print the answer in the following format:

翻译中…

a_1 \ b_1
:
a_N \ b_N

翻译中…

In case there are multiple possible answers, print any.

翻译中…

样例

Input #1
1
Output #1
1 1
Snuke made an excellent website with only one page. It even contains two links to itself!
Input #2
3
Output #2
2 3
1 3
1 2
Here we can jump from any page to any other page by a direct link.
题目信息
题号
agc050_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。