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;
class Bridges {
 public:
  Bridges(vector<vector<int> > h) {
    g = h;
    int n = (int)(g).size();
    used.assign(n, false);
    ret.resize(n);
    tin.resize(n);
    timer = 0;
    dfs(0, 0);
    int cc = 0;
    compId.assign(n, -1);
    for (int i = 0; i < n; ++i) {
      if (compId[i] != -1) {
        continue;
      }
      vector<int> vis;
      compId[i] = cc;
      queue<int> q;
      q.push(i);
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        vis.push_back(v);
        for (int to : g[v]) {
          if (bridges.count({v, to})) {
            continue;
          }
          if (compId[to] != -1) {
            continue;
          }
          compId[to] = cc;
          q.push(to);
        }
      }
      comps.push_back(vis);
      ++cc;
    }
    tree.resize(cc);
    for (auto it : bridges) {
      int u = it.first, v = it.second;
      u = compId[u], v = compId[v];
      if (u < v) {
        tree[u].push_back(v);
        tree[v].push_back(u);
      }
    }
  }
  void get(vector<vector<int> >& a, vector<vector<int> >& b) {
    a = comps;
    b = tree;
  }

 private:
  vector<vector<int> > g;
  vector<bool> used;
  vector<int> ret;
  vector<int> tin;
  int timer;
  set<pair<int, int> > bridges;
  vector<vector<int> > comps;
  vector<int> compId;
  vector<vector<int> > tree;
  void dfs(int v, int p) {
    tin[v] = ret[v] = timer++;
    used[v] = true;
    for (int to : g[v]) {
      if (to == p) {
        continue;
      }
      if (used[to]) {
        ret[v] = min(ret[v], tin[to]);
      } else {
        dfs(to, v);
        ret[v] = min(ret[v], ret[to]);
        if (ret[to] > tin[v]) {
          bridges.insert({to, v});
          bridges.insert({v, to});
        }
      }
    }
  }
};
void add(vector<pair<int, int> >& ans, const vector<int>& a,
         const vector<int>& b, const set<pair<int, int> >& setik) {
  for (int x : a) {
    for (int y : b) {
      if (!setik.count({x, y})) {
        ans.push_back({x, y});
        return;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int> > g(n);
  set<pair<int, int> > setik;
  while (m--) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    setik.insert({u, v});
    setik.insert({v, u});
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (n == 2) {
    cout << "-1\n";
    return 0;
  }
  Bridges B(g);
  vector<vector<int> > comps;
  B.get(comps, g);
  n = (int)(comps).size();
  assert(n == (int)(g).size());
  if (n == 1) {
    cout << "0\n";
    return 0;
  }
  if (n == 2) {
    for (int x : comps[0]) {
      for (int y : comps[1]) {
        if (!setik.count({x, y})) {
          cout << "1\n";
          cout << x + 1 << " " << y + 1 << "\n";
          return 0;
        }
      }
    }
  }
  int r;
  for (int i = 0; i < n; ++i) {
    if ((int)(g[i]).size() > 1) {
      r = i;
    }
  }
  vector<bool> alive(n, true);
  vector<pair<int, int> > ans;
  while (true) {
    vector<vector<int> > vct;
    vector<bool> used(n, false);
    used[r] = true;
    for (int son : g[r]) {
      if (!alive[son]) {
        continue;
      }
      vector<int> curr;
      used[son] = true;
      queue<int> q;
      q.push(son);
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        if (alive[v] && (int)(g[v]).size() == 1) {
          curr.push_back(v);
        }
        for (int to : g[v]) {
          if (!used[to]) {
            q.push(to);
            used[to] = true;
          }
        }
      }
      if (!curr.empty()) {
        curr.push_back(son);
        vct.push_back(curr);
      }
    }
    alive[r] = false;
    sort((vct).begin(), (vct).end(),
         [&](const vector<int>& x, const vector<int>& y) {
           return (int)(x).size() > (int)(y).size();
         });
    vector<int> par;
    for (int i = 0; i < (int)(vct).size(); ++i) {
      par.push_back(vct[i].back());
      vct[i].pop_back();
    }
    int sum = 0;
    for (int i = 1; i < (int)(vct).size(); ++i) {
      sum += (int)(vct[i]).size();
    }
    int arb = -1;
    int done = 0;
    int init = sum + (int)(vct[0]).size();
    while (true) {
      int max1 = -1, max2 = -1;
      for (int i = 0; i < (int)(vct).size(); ++i) {
        if (vct[i].empty()) {
          continue;
        }
        if (max1 == -1 || (int)(vct[i]).size() > (int)(vct[max1]).size()) {
          max2 = max1;
          max1 = i;
        } else if (max2 == -1 ||
                   (int)(vct[i]).size() > (int)(vct[max2]).size()) {
          max2 = i;
        }
      }
      if (max1 == -1 || max2 == -1) {
        break;
      }
      arb = vct[max1].back();
      add(ans, comps[vct[max1].back()], comps[vct[max2].back()], setik);
      alive[vct[max1].back()] = false;
      vct[max1].pop_back();
      alive[vct[max2].back()] = false;
      vct[max2].pop_back();
      done += 2;
    }
    if (done == init) {
      break;
    }
    if (done == init - 1) {
      for (int i = 0; i < (int)(vct).size(); ++i) {
        if (vct[i].empty()) {
          continue;
        }
        add(ans, comps[vct[i].back()], comps[arb], setik);
        alive[vct[i].back()] = false;
      }
      break;
    } else {
      r = par[0];
    }
  }
  cout << (int)(ans).size() << "\n";
  for (int i = 0; i < (int)(ans).size(); ++i) {
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << "\n";
  }
}