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 M = 1e5 + 20;
int cnt[M], epar[M], par[M], res, comp[M], k, t, st[M];
vector<pair<int, int> > adj[M];
vector<pair<int, int> > leaf;
vector<int> ans[M];
vector<int> adj2[M];
bool mark[M], visit[M], boreshi[M], ham[M], barg[M], ham2[M];
int n, m;
void dfs(int u) {
  mark[u] = true;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    int e = adj[u][i].second;
    if (!mark[v]) {
      par[v] = u;
      visit[e] = true;
      epar[v] = e;
      dfs(v);
      cnt[u] += cnt[v];
    } else {
      if (v != par[u] && !visit[e]) {
        cnt[u]++;
        cnt[v]--;
        visit[e] = true;
      }
    }
  }
}
void doha(int u) {
  mark[u] = true;
  comp[u] = res;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    int e = adj[u][i].second;
    if (!mark[v] && !boreshi[e]) {
      doha(v);
    }
  }
}
void dfs2(int u) {
  st[u] = t++;
  mark[u] = true;
  for (int i = 0; i < adj2[u].size(); i++) {
    int v = adj2[u][i];
    if (!mark[v]) {
      dfs2(v);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back({v, i});
    adj[v].push_back({u, i});
  }
  if (n == 2) {
    cout << "-1\n";
    return 0;
  }
  dfs(0);
  for (int i = 1; i < n; i++) {
    if (cnt[i] == 0) {
      boreshi[epar[i]] = true;
    }
  }
  fill(mark, mark + M, 0);
  fill(visit, visit + M, 0);
  for (int i = 0; i < n; i++) {
    if (!mark[i]) {
      doha(i);
      res++;
    }
  }
  if (res == 1) {
    cout << "0\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < adj[i].size(); j++) {
      int v = adj[i][j].first;
      if (comp[i] != comp[v]) adj2[comp[i]].push_back(comp[v]);
    }
  }
  fill(mark, mark + M, 0);
  dfs2(0);
  for (int i = 0; i < res; i++) {
    if (adj2[i].size() == 1) leaf.push_back({st[i], i});
  }
  sort(leaf.begin(), leaf.end());
  k = leaf.size();
  cout << (k + 1) / 2 << "\n";
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < n; j++) {
      if (comp[j] == leaf[i].second) {
        barg[j] = true;
        ans[i].push_back(j);
      }
    }
  }
  for (int i = 0; i < adj[ans[k - 1][0]].size(); i++)
    ham[adj[ans[k - 1][0]][i].first] = true;
  for (int i = 0; i < adj[ans[0][0]].size(); i++)
    ham2[adj[ans[0][0]][i].first] = true;
  if (k == 2) {
    for (int i = 0; i < n; i++) {
      if (ans[0][0] != i && !ham2[i] && barg[i] && comp[i] != comp[ans[0][0]]) {
        cout << i + 1 << " " << ans[0][0] + 1 << "\n";
        return 0;
      }
    }
  }
  if (k % 2 == 0) {
    for (int i = 0; i < k / 2; i++) {
      cout << ans[i][0] + 1 << " " << ans[i + (k / 2)][0] + 1 << "\n";
    }
  } else {
    for (int i = 0; i < (k - 1) / 2; i++) {
      cout << ans[i][0] + 1 << " " << ans[i + (k - 1) / 2][0] + 1 << "\n";
    }
    for (int i = 0; i < n; i++) {
      if (ans[k - 1][0] != i && !ham[i] && barg[i] &&
          comp[i] != comp[ans[k - 1][0]]) {
        cout << i + 1 << " " << ans[k - 1][0] + 1 << "\n";
        break;
      }
    }
  }
  return 0;
}