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;
int co[999];
int n, m, cnt = 1;
stack<int> topol;
vector<int> leaf;
bool vis[999], adjmat[999][999];
vector<int> adj[999], in[999], out[999], comp[999];
void direct(int v, int p) {
  vis[v] = true;
  for (auto u : adj[v]) {
    if (!vis[u]) {
      in[u].push_back(v);
      out[v].push_back(u);
      direct(u, v);
    } else if (u != p) {
      in[u].push_back(v);
      out[v].push_back(u);
    }
  }
}
void topoldfs(int v) {
  vis[v] = true;
  for (auto u : adj[v]) {
    if (!vis[u]) {
      topoldfs(u);
    }
  }
  topol.push(v);
}
void sccdfs(int v) {
  comp[cnt].push_back(v);
  co[v] = cnt;
  for (auto u : in[v]) {
    if (co[u] == 0) {
      sccdfs(u);
    }
  }
}
void findLeaves(int v, int fa) {
  for (auto u : adj[v]) {
    if (u != fa) {
      findLeaves(u, v);
    }
  }
  if (adj[v].size() == 1) {
    leaf.push_back(v);
  }
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int v1, v2;
    cin >> v1 >> v2;
    adj[v1].push_back(v2);
    adj[v2].push_back(v1);
    adjmat[v1][v2] = adjmat[v2][v1] = true;
  }
  if (n == 2 and m == 1) {
    cout << -1 << endl;
    return 0;
  }
  direct(1, -1);
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      topoldfs(i);
    }
  }
  while (!topol.empty()) {
    int v = topol.top();
    topol.pop();
    if (co[v] == 0) {
      sccdfs(v);
      cnt++;
    }
  }
  cnt--;
  if (cnt == 1) {
    cout << 0 << endl;
    return 0;
  }
  if (cnt == 2) {
    for (auto u : comp[1]) {
      for (auto v : comp[2]) {
        if (!adjmat[u][v]) {
          cout << 1 << endl;
          cout << u << ' ' << v << endl;
          return 0;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    adj[i].clear();
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (adjmat[i][j] and co[i] != co[j]) {
        adj[co[i]].push_back(co[j]);
      }
    }
  }
  for (int i = 1; i <= cnt; i++) {
    if (adj[i].size() > 1) {
      findLeaves(i, -1);
      break;
    }
  }
  int t = leaf.size();
  cout << (int)ceil(t / 2.0) << endl;
  for (int i = 0; i < (t + 1) / 2; i++) {
    int x = leaf[i], y = leaf[min(i + (t / 2), t - 1)];
    for (auto u : comp[x]) {
      for (auto v : comp[y]) {
        if (!adjmat[u][v]) {
          cout << u << ' ' << v << endl;
          goto label;
        }
      }
    }
  label:;
  }
  return 0;
}