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 + 10;
const int M = 100000 + 10;
int mark[N], h[N], cut[M], dp[N], st[N], par[N], sz[N], t;
pair<int, int> E[M];
vector<pair<int, int> > adj[N];
vector<int> T[N], vec;
int getPar(int v) { return (par[v] == v ? v : par[v] = getPar(par[v])); }
void merge(int u, int v) {
  u = getPar(u);
  v = getPar(v);
  if (u == v) return;
  if (sz[v] < sz[u]) swap(u, v);
  par[u] = v;
  sz[v] += sz[u];
}
void dfs0(int v, int p) {
  mark[v] = 1;
  dp[v] = h[v];
  for (pair<int, int> e : adj[v]) {
    int u = e.first, id = e.second;
    if (id == p) continue;
    if (!mark[u]) {
      h[u] = h[v] + 1;
      dfs0(u, id);
      if (h[u] <= dp[u]) cut[id] = 1;
      dp[v] = min(dp[v], dp[u]);
    } else
      dp[v] = min(dp[v], h[u]);
  }
}
void dfs1(int v, int p) {
  st[v] = t++;
  for (int u : T[v])
    if (u != p) dfs1(u, v);
}
bool cmp(int x, int y) { return st[x] < st[y]; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(make_pair(v, i));
    adj[v].push_back(make_pair(u, i));
    E[i] = make_pair(u, v);
  }
  dfs0(1, -1);
  for (int i = 0; i < N; i++) par[i] = i, sz[i] = 1;
  for (int i = 0; i < m; i++)
    if (cut[i] == 0) merge(E[i].first, E[i].second);
  for (int i = 0; i < m; i++) {
    if (cut[i] == 0) continue;
    int u = getPar(E[i].first), v = getPar(E[i].second);
    T[u].push_back(v);
    T[v].push_back(u);
  }
  int x = 1;
  for (int i = 1; i <= n; i++) {
    if (getPar(i) != i) continue;
    if (1 < (int)(T[i].size()))
      x = i;
    else
      vec.push_back(i);
  }
  dfs1(x, -1);
  sort((vec).begin(), (vec).end(), cmp);
  if (n == 2) return cout << -1, 0;
  if ((int)(vec.size()) == 1) return cout << 0, 0;
  cout << ((int)(vec.size()) + 1) / 2 << '\n';
  for (int i = 0; i < ((int)(vec.size()) + 1) / 2; i++)
    cout << vec[i] << ' ' << vec[i + (int)(vec.size()) / 2] << '\n';
  return 0;
}