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;
struct Edge {
  int v, next;
} edge[1050 * 1050 * 2];
int e, first[1050];
int n, lv, pre[1050];
set<pair<int, int> > st;
pair<int, int> p1[1050 * 1050], p2[1050 * 1050];
int m;
int cnt, low[1050], dfn[1050];
bool flag[1050];
int dist[1050];
int from[1050];
vector<pair<int, int> > g;
void init() {
  e = 0;
  memset(first, -1, sizeof(first));
}
void add_edge(int u, int v) {
  edge[e].v = v;
  edge[e].next = first[u];
  first[u] = e++;
}
void insert(int u, int v) {
  add_edge(u, v);
  add_edge(v, u);
}
int find(int u) {
  if (pre[u] != u) pre[u] = find(pre[u]);
  return pre[u];
}
void dfs(int u, int fa) {
  flag[u] = true;
  low[u] = dfn[u] = ++cnt;
  for (int i = first[u]; i != -1; i = edge[i].next) {
    int v = edge[i].v;
    if (!flag[v]) {
      dfs(v, u);
      low[u] = min(low[u], low[v]);
      if (low[v] != dfn[v]) {
        pre[find(v)] = find(u);
        lv--;
      }
    } else if (fa != v)
      low[u] = min(low[u], dfn[v]);
  }
}
void dfs2(int u) {
  flag[u] = true;
  for (int i = first[u]; i != -1; i = edge[i].next) {
    int v = edge[i].v;
    if (flag[v]) continue;
    dist[v] = dist[u] + 1;
    from[v] = u;
    dfs2(v);
  }
}
int find_dist(int s) {
  memset(flag, false, sizeof(flag));
  dist[s] = 0;
  from[s] = 0;
  dfs2(s);
  for (int i = 1; i <= n; i++)
    if (find(i) == i && dist[i] > dist[s]) s = i;
  return s;
}
void solve() {
  if (n == 2) {
    puts("-1");
    return;
  }
  g.clear();
  for (int i = 1; i <= n; i++) pre[i] = i;
  lv = n;
  cnt = 0;
  memset(flag, false, sizeof(flag));
  dfs(1, 0);
  while (lv > 2) {
    cnt = 0;
    for (int i = 0; i < m; i++) p2[i] = p1[i];
    init();
    for (int i = 0; i < m; i++)
      if (find(p2[i].first) != find(p2[i].second)) {
        p1[cnt++] = p2[i];
        insert(find(p2[i].first), find(p2[i].second));
      }
    m = cnt;
    int s, t;
    s = find_dist(find(1));
    t = find_dist(s);
    pair<int, int> pp = make_pair(s, t);
    if (s > t) swap(pp.first, pp.second);
    g.push_back(pp);
    st.insert(pp);
    while (t != s) {
      pre[t] = from[t];
      t = from[t];
      lv--;
    }
  }
  bool f = false;
  if (lv != 1) {
    for (int i = 1; i <= n && !f; i++)
      for (int j = i + 1; j <= n; j++)
        if (find(i) != find(j) && st.find(make_pair(i, j)) == st.end()) {
          g.push_back(make_pair(i, j));
          f = true;
          break;
        }
  }
  printf("%d\n", g.size());
  for (int k = 0; k < g.size(); k++) printf("%d %d\n", g[k].first, g[k].second);
}
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    init();
    st.clear();
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &p1[i].first, &p1[i].second);
      if (p1[i].first > p1[i].second) swap(p1[i].first, p1[i].second);
      insert(p1[i].first, p1[i].second);
      st.insert(p1[i]);
    }
    solve();
  }
  return 0;
}