Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

B. Road Construction

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputA country has *n* cities. Initially, there is no road in the country. One day, the king decides to construct some roads connecting pairs of cities. Roads can be traversed either way. He wants those roads to be constructed in such a way that it is possible to go from each city to any other city by traversing at most two roads. You are also given *m* pairs of cities — roads cannot be constructed between these pairs of cities.

Your task is to construct the minimum number of roads that still satisfy the above conditions. The constraints will guarantee that this is always possible.

Input

The first line consists of two integers *n* and *m* .

Then *m* lines follow, each consisting of two integers *a*_{i} and *b*_{i} (1 ≤ *a*_{i}, *b*_{i} ≤ *n*, *a*_{i} ≠ *b*_{i}), which means that it is not possible to construct a road connecting cities *a*_{i} and *b*_{i}. Consider the cities are numbered from 1 to *n*.

It is guaranteed that every pair of cities will appear at most once in the input.

Output

You should print an integer *s*: the minimum number of roads that should be constructed, in the first line. Then *s* lines should follow, each consisting of two integers *a*_{i} and *b*_{i} (1 ≤ *a*_{i}, *b*_{i} ≤ *n*, *a*_{i} ≠ *b*_{i}), which means that a road should be constructed between cities *a*_{i} and *b*_{i}.

If there are several solutions, you may print any of them.

Examples

Input

4 1

1 3

Output

3

1 2

4 2

2 3

Note

This is one possible solution of the example:

These are examples of wrong solutions:

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/24/2017 17:02:08 (c3).

Desktop version, switch to mobile version.
User lists

Name |
---|