CSES - Building Roads
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Byteland has nn cities, and mm roads between them. The goal is to construct new roads so that there is a route between any two cities.

Your task is to find out the minimum number of roads required, and also determine which roads should be built.

Input

The first input line has two integers nn and mm: the number of cities and roads. The cities are numbered 1,2,,n1,2,\dots,n.

After that, there are mm lines describing the roads. Each line has two integers aa and bb: there is a road between those cities.

A road always connects two different cities, and there is at most one road between any two cities.

Output

First print an integer kk: the number of required roads.

Then, print kk lines that describe the new roads. You can print any valid solution.

Constraints

  • 1n1051 \le n \le 10^5
  • 1m21051 \le m \le 2 \cdot 10^5
  • 1a,bn1 \le a,b \le n

Example

Input:

4 2
1 2
3 4

Output:

1
2 3