Wormhole Construction
题号:NC24777
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 128 M,其他语言256 M
Special Judge, 64bit IO Format: %lld

题目描述

Among the N planets somewhere in Galaxy, there’s no way to move from one to another initially. To make it convenient to travel between any two planets, you can arbitrarily build some one-way wormholes between any two of them. 
Pay attention that inverse wormholes will make the space unstable, which means you cannot build wormhole from u to v and wormhole from v to u at the same time. 
If for any two planets u,v there always exists at least one path from u to v consists of no more than d wormholes, we can call the wormhole system with inconvenience d. 
Obviously you can construct wormhole systems with different inconvenience values by building different sets of wormholes. Please give a solution to make d as small as possible.


Attention: Loops and multiple wormholes in your solution will also be treated as WRONG ANSWER.


输入描述:

One integer N, the number of planets.

输出描述:

Two numbers in the first line, d and m,indicate the minimum inconvenience and the number of wormholes in your solution.

Then m lines indicate your solution, oneline describing one wormhole from u to v .

示例1

输入

复制
4

输出

复制
3 4
1 2
2 3
3 4
4 1

说明