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 N = 900 + 77;
int n, m, top[N], dis[N], color[N], tim = 1, root;
bool M[N];
vector<int> a[N], b[N], vert[N], leaves;
void dfs_pre(int v, int prev = -1) {
  M[v] = 1;
  for (int u : a[v]) {
    if (u == prev) {
      continue;
    }
    if (M[u]) {
      if (dis[u] < dis[top[v]]) {
        top[v] = u;
      }
      continue;
    }
    dis[u] = dis[v] + 1;
    top[u] = u;
    dfs_pre(u, v);
    if (dis[top[u]] < dis[top[v]]) {
      top[v] = top[u];
    }
  }
}
void dfs_aft(int v) {
  M[v] = 1;
  for (int u : a[v]) {
    if (M[u]) {
      continue;
    }
    color[u] = color[v];
    if (top[u] == u) {
      color[u] = tim++;
      b[color[v]].push_back(color[u]);
      b[color[u]].push_back(color[v]);
    }
    dfs_aft(u);
  }
  vert[color[v]].push_back(v);
  m = max(m, color[v]);
}
void dfs(int v, int prev = -1) {
  int ch = 0;
  for (int u : b[v]) {
    if (u == prev) {
      continue;
    }
    ch++;
    dfs(u, v);
  }
  if (ch == 0) {
    leaves.push_back(v);
  }
}
inline bool hasEdge(int v, int u) {
  return *lower_bound(a[v].begin(), a[v].end(), u) == u;
}
int main() {
  scanf("%d %d", &n, &m);
  if (n == 2) {
    printf("-1");
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    int v, u;
    scanf("%d %d", &v, &u);
    a[v].push_back(u);
    a[u].push_back(v);
  }
  for (int i = 1; i <= n; i++) {
    sort(a[i].begin(), a[i].end());
  }
  m = 0;
  top[1] = 1;
  dfs_pre(1);
  memset(M, 0, sizeof(M));
  color[1] = tim++;
  dfs_aft(1);
  if (m == 1) {
    printf("0");
    return 0;
  } else if (m == 2) {
    for (auto x : vert[1]) {
      for (auto y : vert[2]) {
        if (!hasEdge(x, y)) {
          printf("1\n");
          printf("%d %d", x, y);
          return 0;
        }
      }
    }
    printf("WTF");
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    if ((int)b[i].size() > 1) {
      root = i;
    }
  }
  dfs(root);
  int sz = leaves.size();
  printf("%d\n", (sz + 1) / 2);
  for (int i = 0; i < sz; i++) {
    if ((i + (sz >> 1)) >= sz) {
      continue;
    }
    printf("%d %d\n", vert[leaves[i]][0], vert[leaves[i + (sz >> 1)]][0]);
  }
  return 0;
}