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;
set<pair<int, int>> edges;
vector<int> adia[100010];
vector<int> newadia[100010];
int cnt;
int h[100010];
int up[100010];
int nou[100010];
int nr_frunze;
vector<int> one_old[100010];
int g[100010];
bool viz[100010];
vector<int> fii[100010];
set<int> frunzeact;
void dfs(int nod, int tata) {
  up[nod] = 1 + h[tata];
  h[nod] = 1 + h[tata];
  for (auto i : adia[nod]) {
    if (i == tata) continue;
    if (h[i])
      up[nod] = min(up[nod], h[i]);
    else {
      dfs(i, nod);
      up[nod] = min(up[nod], up[i]);
    }
  }
}
void get_comp(int nod, int col) {
  viz[nod] = 1;
  nou[nod] = col;
  one_old[col].push_back(nod);
  for (auto i : adia[nod]) {
    if (!viz[i]) {
      if (up[i] <= h[nod])
        get_comp(i, col);
      else
        get_comp(i, ++cnt);
    }
  }
}
void get_g(int nod, int tata) {
  g[nod] = (newadia[nod].size() == 1);
  for (auto i : newadia[nod]) {
    if (i != tata) {
      get_g(i, nod);
      g[nod] += g[i];
    }
  }
}
int get_centr(int nod, int tata) {
  for (auto i : newadia[nod]) {
    if (i == tata) continue;
    if (2 * g[i] >= g[1]) return get_centr(i, nod);
  }
  return nod;
}
int get_frunze(int nod, int tata) {
  if (newadia[nod].size() == 1) {
    fii[nod].push_back(nod);
    return nod;
  }
  int ans(nod);
  for (auto i : newadia[nod]) {
    if (i == tata) continue;
    int q = get_frunze(i, nod);
    if (fii[q].size() > fii[ans].size()) swap(ans, q);
    for (auto j : fii[q]) fii[ans].push_back(j);
  }
  return ans;
}
int main() {
  int n, m, a, b;
  cin >> n >> m;
  while (m--) {
    cin >> a >> b;
    adia[a].push_back(b);
    adia[b].push_back(a);
    edges.insert({a, b});
    edges.insert({b, a});
  }
  if (n == 2) {
    cout << "-1\n";
    return 0;
  }
  dfs(1, 0);
  cnt = 1;
  get_comp(1, 1);
  for (int i(1); i <= n; i++)
    for (auto j : adia[i]) newadia[nou[i]].push_back(j);
  for (int i(1); i <= cnt; i++) {
    for (int j(0); j < newadia[i].size(); j++) {
      newadia[i][j] = nou[newadia[i][j]];
      if (newadia[i][j] == i) {
        swap(newadia[i][j], newadia[i][newadia[i].size() - 1]);
        newadia[i].pop_back();
        j--;
      }
    }
    sort(newadia[i].begin(), newadia[i].end());
    newadia[i].resize(unique(newadia[i].begin(), newadia[i].end()) -
                      newadia[i].begin());
  }
  int s1(0);
  for (int i(1); i <= cnt; i++) s1 += newadia[i].size();
  assert(s1 == 2 * (cnt - 1));
  get_g(1, 0);
  int centr = get_centr(1, 0);
  priority_queue<pair<int, int>> q;
  set<int> s;
  for (auto i : newadia[centr]) {
    int z = get_frunze(i, centr);
    q.push({fii[z].size(), z});
    for (auto j : fii[z]) {
      assert(s.find(j) == s.end());
      s.insert(j);
    }
  }
  assert(s.size() + (newadia[centr].size() == 1) == g[1]);
  int ans(0);
  int a1 = 0, p1, a2 = 0, p2;
  vector<pair<int, int>> vans;
  while (!q.empty()) {
    auto i = q.top();
    q.pop();
    if (q.empty()) {
      if (i.second != p1 && a1)
        vans.push_back({fii[i.second].back(), a1});
      else if (i.second != p2 && a2)
        vans.push_back({fii[i.second].back(), a2});
      else
        vans.push_back({fii[i.second].back(), centr});
      fii[i.second].pop_back();
      i.first--;
      if (i.first) q.push(i);
      ans++;
    } else {
      ans++;
      auto j = q.top();
      q.pop();
      a1 = fii[i.second].back(), p1 = i.second;
      a2 = fii[j.second].back(), p2 = j.second;
      vans.push_back({fii[i.second].back(), fii[j.second].back()});
      fii[i.second].pop_back();
      fii[j.second].pop_back();
      i.first--;
      j.first--;
      if (i.first) q.push(i);
      if (j.first) q.push(j);
    }
  }
  for (auto& i : vans)
    if (i.first > i.second) swap(i.first, i.second);
  sort(vans.begin(), vans.end());
  vans.resize(unique(vans.begin(), vans.end()) - vans.begin());
  cout << vans.size() << '\n';
  for (auto i : vans) {
    bool found(0);
    for (auto j : one_old[i.first]) {
      if (found) break;
      for (auto k : one_old[i.second]) {
        if (found) break;
        if (edges.find({j, k}) == edges.end()) {
          found = 1;
          cout << j << ' ' << k << '\n';
        }
      }
    }
    assert(found);
  }
  return 0;
}