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;
bool m[N][N], dir[N][N], t[N][N], mp[N][N];
vector<int> adj[N], dig[N], rev_dig[N], tree[N];
bool _vis[N], s_vis[N], rev_vis[N];
int h[N], comp, cmp[N], st[N], en[N], tim;
vector<int> topol, mol[N];
vector<pair<int, int> > edg;
void dir_dfs(int v) {
  _vis[v] = true;
  for (auto u : adj[v]) {
    if (_vis[u]) {
      if (dir[u][v] || dir[v][u]) continue;
      if (h[u] == h[v] - 1) {
        dir[u][v] = true;
        dig[u].push_back(v);
        rev_dig[v].push_back(u);
        edg.push_back({u, v});
      } else {
        dir[v][u] = true;
        dig[v].push_back(u);
        rev_dig[u].push_back(v);
        edg.push_back({u, v});
      }
      continue;
    }
    h[u] = h[v] + 1;
    dir_dfs(u);
  }
}
void s_dfs(int v) {
  s_vis[v] = true;
  for (auto u : dig[v]) {
    if (!s_vis[u]) s_dfs(u);
  }
  topol.push_back(v);
}
void rev_dfs(int v, int comp) {
  rev_vis[v] = true;
  cmp[v] = comp;
  mol[comp].push_back(v);
  for (auto u : rev_dig[v]) {
    if (!rev_vis[u]) rev_dfs(u, comp);
  }
}
void SCC(int v) {
  s_dfs(v);
  reverse(topol.begin(), topol.end());
  for (auto u : topol) {
    if (!rev_vis[u]) rev_dfs(u, comp++);
  }
}
void last_dfs(int v, int p = -1) {
  st[v] = tim++;
  for (auto u : tree[v]) {
    if (u == p) continue;
    last_dfs(u, v);
  }
  en[v] = tim;
}
int get_ans_comp(int v) {
  edg.clear();
  dir_dfs(v);
  topol.clear();
  int L = comp;
  SCC(v);
  int R = comp;
  if (R - L < 2) return 0;
  if (edg.size() == 1) {
    cout << -1 << '\n';
    exit(0);
  }
  for (auto X : edg) {
    int x = X.first, y = X.second;
    if (cmp[x] == cmp[y]) continue;
    if (t[cmp[x]][cmp[y]]) continue;
    t[cmp[x]][cmp[y]] = t[cmp[y]][cmp[x]] = true;
    tree[cmp[x]].push_back(cmp[y]);
    tree[cmp[y]].push_back(cmp[x]);
  }
  vector<pair<int, int> > leaf;
  int id = -1;
  for (int i = L; i < R; i++) {
    if (tree[i].size() == 1)
      leaf.push_back({0, i});
    else
      id = i;
  }
  last_dfs(id);
  for (int i = 0; i < leaf.size(); i++) {
    int u = leaf[i].second;
    leaf[i].first = st[u];
  }
  sort(leaf.begin(), leaf.end());
  int sz = leaf.size();
  vector<pair<int, int> > new_yal;
  for (int i = 0; i < sz / 2; i++) {
    int u = leaf[i].second, w = leaf[i + sz / 2].second;
    new_yal.push_back({u, w});
  }
  if (sz % 2 == 1) new_yal.push_back({leaf[0].second, leaf[sz - 1].second});
  for (auto T : new_yal) {
    bool is_it = false;
    int w = T.first, z = T.second;
    for (auto u : mol[w]) {
      if (is_it) break;
      for (auto uu : mol[z]) {
        if (is_it) break;
        if (!m[u][uu]) {
          is_it = true;
          m[u][uu] = m[uu][u] = true;
        }
      }
    }
  }
  return (sz + 1) / 2;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, e;
  cin >> n >> e;
  for (int i = 0; i < e; i++) {
    int u, v;
    cin >> u >> v;
    m[u][v] = m[v][u] = true;
    mp[u][v] = mp[v][u] = true;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (_vis[i]) continue;
    ans += get_ans_comp(i);
  }
  cout << ans << '\n';
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      if (!mp[i][j] && m[i][j]) cout << i << ' ' << j << '\n';
    }
  }
}