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 maxn = (5e5) + 10, mod = 1e9 + 7;
int n, m, C = 1, col[maxn], p[maxn], ti, st[maxn];
vector<int> G[maxn], in[maxn], out[maxn], topol, vert[maxn];
vector<pair<int, int> > edg, res;
bool mark[maxn];
map<pair<int, int>, bool> mrk, mrk2;
void pre_DFS(int v = 1) {
  mark[v] = 1;
  for (int u : G[v]) {
    if (!mark[u]) {
      out[v].push_back(u);
      p[u] = p[v] + 1;
      in[u].push_back(v);
      pre_DFS(u);
    } else {
      if (p[u] + 1 == p[v]) continue;
      out[v].push_back(u);
      in[u].push_back(v);
    }
  }
}
void DFS(int v) {
  mark[v] = 1;
  for (int u : out[v])
    if (!mark[u]) DFS(u);
  topol.push_back(v);
}
void sfd(int v) {
  col[v] = C;
  vert[C].push_back(v);
  for (int u : in[v])
    if (!col[u]) sfd(u);
}
void my_DFS(int v, int p) {
  if (G[v].size() == 1) res.push_back(make_pair(ti, v));
  st[v] = ti;
  for (int u : G[v])
    if (u != p) my_DFS(u, v);
  ti++;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
    mrk[make_pair(x, y)] = 1;
    mrk[make_pair(y, x)] = 1;
    edg.push_back(make_pair(x, y));
  }
  if (n == 2) return cout << -1 << '\n', 0;
  pre_DFS();
  memset(mark, 0, sizeof mark);
  for (int i = 1; i <= n; i++)
    if (!mark[i]) DFS(i);
  reverse(topol.begin(), topol.end());
  for (int v : topol)
    if (!col[v]) {
      sfd(v);
      C++;
    }
  if (C == 2) return cout << 0 << '\n', 0;
  for (int i = 1; i <= n; i++) G[i].clear();
  for (pair<int, int> eg : edg)
    if (col[eg.first] ^ col[eg.second] &&
        !mrk2[make_pair(col[eg.first], col[eg.second])])
      G[col[eg.first]].push_back(col[eg.second]),
          G[col[eg.second]].push_back(col[eg.first]),
          mrk2[make_pair(col[eg.first], col[eg.second])] = 1,
                                        mrk2[make_pair(col[eg.second],
                                                       col[eg.first])] = 1;
  int flg = 0;
  for (int i = 1; i < C; i++)
    if (G[i].size() > 1) {
      flg = i;
      break;
    }
  if (!flg) {
    res.push_back(make_pair(0, 1));
    res.push_back(make_pair(0, 2));
  } else
    my_DFS(flg, -1);
  int CC = res.size();
  sort(res.begin(), res.end());
  cout << ceil(((double)CC) / 2) << '\n';
  for (int i = 0; i < (CC + 1) / 2; i++) {
    bool ff = 0;
    for (int x : vert[res[i].second]) {
      for (int y : vert[res[min(i + CC / 2, CC - 1)].second]) {
        if (!mrk[make_pair(x, y)]) {
          cout << x << ' ' << y << '\n';
          ff = 1;
        }
        if (ff) break;
      }
      if (ff) break;
    }
  }
}