Problem: The Berland capital (as you very well know) contains n junctions, some pairs of which are connected by two-way roads. Unfortunately, the number of traffic jams in the capital has increased dramatically, that's why it was decided to build several new roads. Every road should connect two junctions. 

The city administration noticed that in the cities of all the developed countries between any two roads one can drive along at least two paths so that the paths don't share any roads (but they may share the same junction). The administration decided to add the minimal number of roads so that this rules was fulfilled in the Berland capital as well. In the city road network should exist no more than one road between every pair of junctions before or after the reform.

Input

The first input line contains a pair of integers n, m (2 ≤ n ≤ 900, 1 ≤ m ≤ 100000), where n is the number of junctions and m is the number of roads. Each of the following m lines contains a description of a road that is given by the numbers of the connected junctions ai, bi (1 ≤ ai, bi ≤ n, ai ≠ bi). The junctions are numbered from 1 to n. It is possible to reach any junction of the city from any other one moving along roads.

Output

On the first line print t — the number of added roads. Then on t lines print the descriptions of the added roads in the format of the input data. You can use any order of printing the roads themselves as well as the junctions linked by every road. If there are several solutions to that problem, print any of them.

If the capital doesn't need the reform, print the single number 0.

If there's no solution, print the single number -1.

Examples

Input

4 3
1 2
2 3
3 4


Output

1
1 4


Input

4 4
1 2
2 3
2 4
3 4


Output

1
1 3

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MX = 900 + 10, MXM = 1e5 + 10, MD = 1e9 + 7;
int n, m, a[MX], ans, tmp, h[MX], col = 1, color[MX], U[MXM], V[MXM];
vector<int> adj[MX], radj[MX], tmp_adj[MX], cp[MX], topol, leaves;
bool edge[MX][MX], mark[MX];
void pre_dfs(int v = 0) {
  mark[v] = 1;
  for (auto u : tmp_adj[v]) {
    if (mark[u] && h[u] < h[v] - 1) {
      adj[v].push_back(u);
      radj[u].push_back(v);
    } else if (!mark[u]) {
      h[u] = h[v] + 1;
      pre_dfs(u);
      adj[v].push_back(u);
      radj[u].push_back(v);
    }
  }
}
void dfs(int v) {
  mark[v] = 1;
  for (auto u : adj[v])
    if (!mark[u]) dfs(u);
  topol.push_back(v);
}
void sfd(int v) {
  color[v] = col;
  for (auto u : radj[v])
    if (!color[u]) sfd(u);
}
void final_dfs(int v = 0, int p = -1) {
  for (auto u : adj[v]) {
    if (u == p) continue;
    final_dfs(u, v);
  }
  if (adj[v].size() == 1) leaves.push_back(v);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &U[i], &V[i]);
    U[i]--;
    V[i]--;
    tmp_adj[U[i]].push_back(V[i]);
    tmp_adj[V[i]].push_back(U[i]);
    edge[min(U[i], V[i])][max(U[i], V[i])] = 1;
  }
  pre_dfs();
  memset((mark), 0, sizeof(mark));
  memset((h), 0, sizeof(h));
  for (int i = 0; i < n; i++)
    if (!mark[i]) dfs(i);
  reverse(topol.begin(), topol.end());
  for (auto v : topol)
    if (!color[v]) sfd(v), col++;
  topol.clear();
  for (int i = 0; i < n; i++) cp[color[i]].push_back(i);
  for (int i = 0; i < n; i++) {
    adj[i].clear();
    radj[i].clear();
    tmp_adj[i].clear();
  }
  int id = -1;
  for (int i = 0; i < m; i++) {
    int v = V[i], u = U[i];
    if (color[v] != color[u]) {
      adj[color[v]].push_back(color[u]);
      adj[color[u]].push_back(color[v]);
      if (adj[color[v]].size() > 1) id = color[v];
      if (adj[color[u]].size() > 1) id = color[u];
    }
  }
  if (col == 2) {
    printf("0");
    return 0;
  }
  if (id == -1) {
    for (auto pa : cp[1])
      for (auto pa2 : cp[2])
        if (!edge[min(pa, pa2)][max(pa2, pa2)]) {
          printf("1\n%d %d", pa + 1, pa2 + 1);
          return 0;
        }
    printf("-1");
    return 0;
  } else {
    final_dfs(id);
    int cnt = leaves.size();
    printf("%d\n", cnt / 2 + (cnt % 2 > 0));
    for (int i = 0; i < cnt / 2 + (cnt % 2 > 0); i++) {
      int u = leaves[i], v = leaves[min(i + cnt / 2 + (cnt % 2 > 0), cnt - 1)];
      int flag = 0;
      for (auto pa : cp[v]) {
        for (auto pa2 : cp[u]) {
          if (!edge[min(pa, pa2)][max(pa2, pa2)])
            printf("%d %d\n", pa + 1, pa2 + 1), flag = 1;
          if (flag) break;
        }
        if (flag) break;
      }
    }
  }
}