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 = 1000;
int n, m, d[N], h[N], cmpt = 0, de[N], mc[N];
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
vector<int> adj[N];
bool mark[N], cut[N];
vector<int> cmpv[N][2];
map<pair<int, int>, bool> mp;
void dfs(int v, int p) {
  mark[v] = true;
  d[v] = h[v] = h[p] + 1;
  for (int i : adj[v]) {
    if (i == p) continue;
    if (mark[i]) {
      d[v] = min(d[v], min(d[i], h[i]));
      continue;
    }
    dfs(i, v);
    d[v] = min(d[v], d[i]);
  }
  if (v == 0 && de[0] == 0) return;
  if (v == 0 && de[0] == 1) {
    if (cmpv[0][0].size() == 0) {
      mc[0] = cmpv[0][1][0];
      return;
    }
    int c1 = cmpv[0][0][0];
    if (cmpv[0][1].size() == 0)
      mc[0] = c1, mc[c1] = 0;
    else {
      int c2 = cmpv[0][1][0];
      mc[0] = c2, mc[mc[c2]] = c1, mc[c1] = mc[c2], mc[c2] = 0;
    }
    return;
  }
  if (h[v] <= d[v] || v == 0) {
    de[p]++;
    if (de[v] == 0) {
      cmpv[p][0].push_back(v);
      return;
    }
    int mi = cmpv[v][0].size(), c1 = -1, c2 = -1;
    if (mi) c1 = cmpv[v][0][0];
    for (int j = 1; j < mi; j++) {
      int i = cmpv[v][0][j];
      c2 = i;
      if (mc[c1] != -1) {
        mc[i] = mc[c1];
        mc[mc[c1]] = i;
        cmpv[v][1].push_back(i);
        mc[c1] = -1;
      } else {
        mc[i] = c1;
        mc[c1] = i;
      }
    }
    if (c1 != -1 && mc[c1] != -1) cmpv[v][1].push_back(c1), c2 = c1, c1 = -1;
    mi = cmpv[v][1].size();
    if (mi) c2 = cmpv[v][1][0];
    for (int j = 1; j < mi; j++) {
      int i = cmpv[v][1][j];
      int mci = mc[i], mcc2 = mc[c2];
      mc[i] = c2;
      mc[c2] = i;
      mc[mci] = mcc2;
      mc[mcc2] = mci;
    }
    if (c1 != -1 && c2 != -1) {
      int tt = mc[c2];
      mc[c1] = c2;
      mc[c2] = c1;
      mc[tt] = -1;
      c1 = tt;
    }
    if (v == 0) {
      if (c1 != -1 && mc[c1] == -1) mc[c1] = 0, mc[0] = c1;
      return;
    }
    if (c1 != -1) {
      if (mc[c1] == -1)
        cmpv[p][0].push_back(c1);
      else
        cmpv[p][1].push_back(c1);
    } else if (c2 != -1)
      cmpv[p][1].push_back(c2);
  } else {
    for (int i : cmpv[v][0]) cmpv[p][0].push_back(i);
    for (int i : cmpv[v][1]) cmpv[p][1].push_back(i);
    de[p] += de[v];
  }
}
int main() {
  fill(mc, mc + N, -1);
  n = in(), m = in();
  if (n == 2) return cout << -1 << endl, 0;
  for (int i = 0; i < m; i++) {
    int u = in() - 1, v = in() - 1;
    mp[make_pair(u, v)] = true;
    mp[make_pair(v, u)] = true;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  dfs(0, 0);
  fill(mark, mark + N, 0);
  int ans = 0;
  vector<int> ansq;
  if (mp[make_pair(0, mc[0])]) {
    if (adj[0].size() == 1) {
      int cc = mc[0];
      if (adj[cc][0] == 0)
        mc[adj[cc][1]] = 0, mc[0] = adj[cc][1], mc[cc] = -1;
      else if (adj[cc][0] != 0)
        mc[adj[cc][0]] = 0, mc[0] = adj[cc][0], mc[cc] = -1;
    } else if (adj[0][0] == mc[0])
      mc[adj[0][1]] = mc[0], mc[mc[0]] = adj[0][1], mc[0] = -1;
    else if (adj[0][0] != mc[0])
      mc[adj[0][0]] = mc[0], mc[mc[0]] = adj[0][0], mc[0] = -1;
  }
  for (int i = 0; i < n; i++) {
    if (mark[i] || mc[i] == -1) continue;
    mark[i] = mark[mc[i]] = true;
    ansq.push_back(i);
    ans++;
  }
  cout << ans << endl;
  for (int i : ansq) printf("%d %d\n", i + 1, mc[i] + 1);
}