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 n, m;
vector<int> e1[((int)910)], e2[((int)910)], e2r[((int)910)];
vector<pair<int, int> > ed;
stack<int> topol;
bool mark[((int)910)];
bool is_ed[((int)910)][((int)910)];
int cp_num[((int)910)], cp_cnt, cnt;
vector<int> e[((int)910)], cp_v[((int)910)];
deque<int> strt;
vector<pair<int, int> > ans;
void dfs1(int x, int par = 0) {
  mark[x] = 1;
  for (auto u : e1[x]) {
    if (u == par) continue;
    if (mark[u] != 2) e2[x].push_back(u), e2r[u].push_back(x);
    if (!mark[u]) dfs1(u, x);
  }
  mark[x] = 2;
}
void dfs2(int x) {
  mark[x] = 1;
  for (auto u : e2[x])
    if (!mark[u]) dfs2(u);
  topol.push(x);
}
void dfs3(int x) {
  mark[x] = 1;
  cp_num[x] = cp_cnt;
  cp_v[cp_cnt].push_back(x);
  for (auto u : e2r[x])
    if (!mark[u]) dfs3(u);
}
void dfs4(int x) {
  mark[x] = 1;
  cnt++;
  if (e[x].size() == 1) strt.push_back(x);
  sort(e[x].begin(), e[x].end());
  for (auto u : e[x])
    if (!mark[u]) dfs4(u);
}
void put_edge(int x, int y) {
  int x1 = cp_v[x][0], y1 = cp_v[y][0];
  if (!is_ed[x1][y1]) {
    ans.push_back({x1, y1});
    return;
  }
  if (cp_v[x].size() > 1)
    ans.push_back({cp_v[x][1], y1});
  else
    ans.push_back({x1, cp_v[y][1]});
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    is_ed[v][u] = is_ed[u][v] = 1;
    ed.push_back({v, u});
    e1[v].push_back(u);
    e1[u].push_back(v);
  }
  for (int i = 1; i <= n; i++)
    if (!mark[i]) dfs1(i);
  memset(mark, 0, sizeof mark);
  for (int i = 1; i <= n; i++)
    if (!mark[i]) dfs2(i);
  memset(mark, 0, sizeof mark);
  while (topol.size()) {
    int x = topol.top();
    topol.pop();
    if (mark[x]) continue;
    cp_cnt++;
    dfs3(x);
  }
  for (auto u : ed) {
    int x = cp_num[u.first], y = cp_num[u.second];
    if (x != y) e[x].push_back(y), e[y].push_back(x);
  }
  memset(mark, 0, sizeof mark);
  for (int i = 1; i <= cp_cnt; i++)
    if (!mark[i]) {
      cnt = 0;
      dfs4(i);
      if (cnt == 1) continue;
      if (cnt == 2 && cp_v[i].size() == 1 && cp_v[e[i][0]].size() == 1)
        return cout << -1, 0;
      for (int i = 0; i < (int)strt.size() / 2; i++)
        put_edge(strt[i], strt[i + (int)strt.size() / 2]);
      if ((int)strt.size() % 2) put_edge(strt[0], strt[(int)strt.size() - 1]);
      strt.clear();
    }
  cout << ans.size() << "\n";
  for (auto u : ans) cout << u.first << " " << u.second << "\n";
  return 0;
}