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 long long MAXN = 1e3 + 10;
const long long MAXM = 1e5 + 10;
vector<pair<long long, long long> > vertex[MAXN];
vector<pair<long long, long long> > q;
vector<long long> d[MAXN];
vector<long long> w[MAXN];
vector<long long> tree[MAXN];
long long t[MAXN];
long long e[MAXN];
long long dp[MAXN];
long long parent[MAXN];
long long height[MAXN];
long long subtree[MAXN];
bool adj[MAXN][MAXN];
bool check[MAXN];
bool edge_check[MAXM];
long long k, s = 1;
pair<long long, long long> f(long long x, long long y) {
  if (!adj[d[x][0]][d[y][0]]) {
    return make_pair(d[x][0], d[y][0]);
  }
  if (d[x].size() == 1 && d[y].size() == 1) {
    cout << -1;
    exit(0);
  }
  if (d[x].size() > 1) {
    return make_pair(d[x][1], d[y][0]);
  }
  if (d[y].size() > 1) {
    return make_pair(d[x][0], d[y][1]);
  }
}
void cut_edge(long long v, long long h) {
  check[v] = true;
  dp[v] = v;
  height[v] = h;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (check[vertex[v][i].first] && vertex[v][i].first != parent[v]) {
      if (height[vertex[v][i].first] < height[dp[v]]) {
        dp[v] = vertex[v][i].first;
      }
    }
  }
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i].first]) {
      parent[vertex[v][i].first] = v;
      cut_edge(vertex[v][i].first, h + 1);
      if (height[dp[vertex[v][i].first]] > height[v]) {
        edge_check[vertex[v][i].second] = true;
      }
      if (height[dp[vertex[v][i].first]] < height[dp[v]]) {
        dp[v] = dp[vertex[v][i].first];
      }
    }
  }
}
void set_dfs(long long v, long long id) {
  check[v] = true;
  e[v] = id;
  d[id].push_back(v);
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i].first] && !edge_check[vertex[v][i].second]) {
      set_dfs(vertex[v][i].first, id);
    }
  }
}
void tree_generator_dfs(long long v) {
  check[v] = true;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i].first]) {
      tree_generator_dfs(vertex[v][i].first);
      if (e[v] != e[vertex[v][i].first]) {
        tree[e[v]].push_back(e[vertex[v][i].first]);
        tree[e[vertex[v][i].first]].push_back(e[v]);
      }
    }
  }
}
void pre_dfs(long long v) {
  check[v] = true;
  subtree[v] = (tree[v].size() == 1);
  k += subtree[v];
  for (long long i = 0; i < tree[v].size(); i++) {
    if (!check[tree[v][i]]) {
      pre_dfs(tree[v][i]);
      subtree[v] += subtree[tree[v][i]];
    }
  }
}
long long get_centroid(long long v) {
  check[v] = true;
  for (long long i = 0; i < tree[v].size(); i++) {
    if (!check[tree[v][i]]) {
      if (2 * subtree[tree[v][i]] > k) {
        return get_centroid(tree[v][i]);
      }
    }
  }
  return v;
}
void subtree_leaf(long long v, long long x) {
  check[v] = true;
  if (tree[v].size() == 1) {
    w[x].push_back(v);
  }
  t[v] = x;
  for (long long i = 0; i < tree[v].size(); i++) {
    if (!check[tree[v][i]]) {
      subtree_leaf(tree[v][i], x);
    }
  }
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  long long n, m, id = 0;
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    long long v, u;
    cin >> v >> u;
    adj[v][u] = true;
    adj[u][v] = true;
    vertex[v].push_back(make_pair(u, id));
    vertex[u].push_back(make_pair(v, id++));
  }
  cut_edge(1, 0);
  fill(check, check + MAXN, false);
  for (long long i = 1; i <= n; i++) {
    if (!check[i]) {
      set_dfs(i, s++);
    }
  }
  fill(check, check + MAXN, false);
  tree_generator_dfs(1);
  fill(check, check + MAXN, false);
  pre_dfs(1);
  fill(check, check + MAXN, false);
  long long c = get_centroid(1);
  fill(check, check + MAXN, false);
  id = 1;
  check[c] = true;
  for (long long i = 0; i < tree[c].size(); i++) {
    subtree_leaf(tree[c][i], id++);
  }
  if (tree[c].size() == 1) {
    w[id++].push_back(c);
  }
  while (k > 1) {
    pair<pair<long long, long long>, pair<long long, long long> > s =
        make_pair(make_pair((long long)(0), (long long)(0)),
                  make_pair((long long)(0), (long long)(0)));
    for (long long i = 0; i < id; i++) {
      if (s.first < make_pair((long long)(w[i].size()), i)) {
        swap(s.first, s.second);
        s.first = make_pair((long long)(w[i].size()), i);
      } else {
        s.second = max(s.second, make_pair((long long)(w[i].size()), i));
      }
    }
    q.push_back(f(w[s.first.second].back(), w[s.second.second].back()));
    w[s.first.second].pop_back();
    w[s.second.second].pop_back();
    k -= 2;
  }
  if (k == 1) {
    long long z;
    for (long long i = 0; i < id; i++) {
      if (w[i].size() > 0) {
        z = w[i][0];
        break;
      }
    }
    for (long long i = 1; i <= s; i++) {
      if (t[z] != t[i]) {
        q.push_back(f(z, i));
        break;
      }
    }
  }
  cout << q.size() << endl;
  for (long long i = 0; i < q.size(); i++) {
    cout << q[i].first << " " << q[i].second << endl;
  }
}