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 = 909, MAXM = 2e5 + 9;
bool con[MAXN][MAXN];
struct Edge {
  int to, next;
} edge[MAXM];
int box[MAXN], low[MAXN], id[MAXN], st[MAXN], col[MAXN], cnt, nd_num, n, m;
vector<int> yy[MAXN];
vector<pair<int, int> > br;
void add(int a, int b) {
  edge[cnt].to = b, edge[cnt].next = box[a], box[a] = cnt++;
}
void dfs(int u, int pre, int dep) {
  st[u] = 1, id[u] = low[u] = dep;
  bool flag = true;
  for (int i = box[u]; i != -1; i = edge[i].next) {
    int v = edge[i].to;
    if (v == pre && flag) {
      flag = false;
      continue;
    }
    if (st[v] == 1)
      low[u] = min(low[u], id[v]);
    else if (st[v] == 0) {
      dfs(v, u, dep + 1);
      low[u] = min(low[u], low[v]);
    }
    if (low[v] > id[u]) br.push_back(make_pair(u, v));
  }
  st[u] = 2;
}
void st_col(int u) {
  yy[col[u]].push_back(u);
  for (int i = box[u]; i != -1; i = edge[i].next) {
    int v = edge[i].to;
    if (col[v]) continue;
    if (low[v] > id[u]) {
      col[v] = ++nd_num;
      yy[nd_num].clear();
    } else
      col[v] = col[u];
    st_col(v);
  }
}
int du[MAXN];
vector<pair<int, int> > ans;
bool vst[2 * MAXN];
bool find(int u, int v, int pre) {
  if (u == v) return true;
  for (int i = box[u]; i != -1; i = edge[i].next) {
    int nx = edge[i].to;
    if (nx == pre) continue;
    if (find(nx, v, u)) {
      vst[i] = vst[i ^ 1] = true;
      return true;
    }
  }
  return false;
}
bool ck() {
  memset(vst, 0, sizeof(vst));
  for (vector<pair<int, int> >::iterator it = ans.begin(); it != ans.end();
       it++)
    find(col[it->first], col[it->second], 0);
  for (int i = 0; i < cnt; i += 2)
    if (!vst[i]) return false;
  return true;
}
pair<int, int> x[MAXN][MAXN];
int main() {
  srand(time(0));
  cin >> n >> m;
  if (n == 2) return cout << -1, 0;
  cnt = 0;
  memset(box, -1, sizeof(box)), memset(con, 0, sizeof(con));
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> v >> u;
    if (con[u][v]) return cout << -1, 0;
    con[u][v] = con[v][u] = true;
    add(u, v);
    add(v, u);
  }
  br.clear(), memset(st, 0, sizeof(st));
  dfs(1, 0, 0);
  memset(col, 0, sizeof(col));
  yy[1].clear(), col[1] = nd_num = 1, st_col(1);
  if (nd_num == 1) return cout << 0, 0;
  memset(box, -1, sizeof(box));
  cnt = 0;
  memset(du, 0, sizeof(du));
  for (vector<pair<int, int> >::iterator it = br.begin(); it != br.end();
       it++) {
    int u = it->first, v = it->second;
    add(col[u], col[v]);
    add(col[v], col[u]);
    du[col[u]]++;
    du[col[v]]++;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (col[i] != col[j] && !con[i][j]) x[col[i]][col[j]] = make_pair(i, j);
  vector<int> leaves;
  for (int i = 1; i <= nd_num; i++)
    if (du[i] == 1) leaves.push_back(i);
  int sz = (int)leaves.size();
  while (true) {
    ans.clear();
    for (int i = 1; i < sz; i += 2) {
      ans.push_back(x[leaves[i - 1]][leaves[i]]);
    }
    if (sz & 1) ans.push_back(x[leaves[0]][leaves[sz - 1]]);
    if (ck()) {
      cout << (sz + 1) / 2 << '\n';
      for (vector<pair<int, int> >::iterator it = ans.begin(); it != ans.end();
           it++)
        cout << it->first << " " << it->second << '\n';
      return 0;
    }
    random_shuffle(leaves.begin(), leaves.end());
  }
}