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;
vector<pair<long long, long long> > E[1000];
bool used[1000];
bool deleted[1000];
bool base[1000][1000];
bool queued[1000];
set<long long> s;
vector<pair<long long, long long> > ans;
set<long long> compact[1000];
long long n, m;
long long dfs(long long pos, long long parent = -1) {
  if (used[pos]) return queued[pos] ? pos : -1;
  used[pos] = queued[pos] = true;
  for (long long i = 0; i < ((long long)((long long)E[pos].size())); i++)
    if (i != parent && E[pos][i].first != -1) {
      long long tmp = dfs(E[pos][i].first, E[pos][i].second);
      if (tmp != -1 && tmp != pos) {
        s.insert(pos);
        queued[pos] = 0;
        return tmp;
      }
      if (tmp == pos) {
        s.insert(pos);
        for (set<long long>::iterator it = s.begin(); it != s.end(); it++)
          for (long long j = 0; j < ((long long)((long long)E[*it].size()));
               j++) {
            if (*it == pos) continue;
            deleted[*it] = true;
            if (E[*it][j].first == -1) continue;
            E[E[*it][j].first][E[*it][j].second].first = -1;
            if (s.find(E[*it][j].first) == s.end()) {
              E[E[*it][j].first][E[*it][j].second] =
                  make_pair(pos, ((long long)E[pos].size()));
              E[pos].push_back(make_pair(E[*it][j].first, E[*it][j].second));
            }
          }
        for (set<long long>::iterator it0 = s.begin(); it0 != s.end(); it0++) {
          for (set<long long>::iterator it1 = compact[*it0].begin();
               it1 != compact[*it0].end(); it1++) {
            compact[pos].insert(*it1);
          }
        }
        s.clear();
      }
    }
  queued[pos] = 0;
  return -1;
}
vector<long long> v;
void cal(long long pos, long long parent = -1) {
  used[pos] = true;
  vector<long long> res0, res1;
  long long cnt = (parent == -1) ? 0 : 1;
  for (long long i = 0; i < ((long long)((long long)E[pos].size())); i++)
    if (E[pos][i].first != -1 && E[pos][i].first != parent) {
      cal(E[pos][i].first, pos);
      long long tmp = 0;
      if (((long long)v.size()) == 1) {
        res0.push_back(v[0]);
      } else {
        while (1 < ((long long)res1.size()) && 1 < ((long long)v.size())) {
          ans.push_back(make_pair(res1.back(), v.back()));
          v.pop_back();
          res1.pop_back();
        }
        for (long long j = 0; j < ((long long)((long long)v.size())); j++)
          res1.push_back(v[j]);
      }
      cnt++;
    }
  while (((long long)res0.size()) && 1 < ((long long)res1.size())) {
    ans.push_back(make_pair(res0.back(), res1.back()));
    res0.pop_back();
    res1.pop_back();
  }
  v.clear();
  for (long long i = 0; i < ((long long)((long long)res0.size())); i++)
    v.push_back(res0[i]);
  for (long long i = 0; i < ((long long)((long long)res1.size())); i++)
    v.push_back(res1[i]);
  if (cnt < 2) v.push_back(pos);
  if (parent == -1 && v[0] != pos) {
    for (long long j = 0; j < ((long long)((long long)v.size()) / 2); j++)
      ans.push_back(make_pair(v[j * 2], v[j * 2 + 1]));
    if (((long long)v.size()) % 2)
      ans.push_back(make_pair(ans.back().first, v.back()));
  }
}
int main() {
  for (long long i = 0; i < ((long long)1000); i++) deleted[i] = false;
  for (long long i = 0; i < ((long long)1000); i++)
    for (long long j = 0; j < ((long long)1000); j++) base[i][j] = false;
  for (long long i = 0; i < ((long long)1000); i++) compact[i].insert(i);
  cin >> n >> m;
  for (long long i = 0; i < ((long long)m); i++) {
    long long a, b;
    cin >> a >> b;
    E[a - 1].push_back(make_pair(b - 1, ((long long)E[b - 1].size())));
    E[b - 1].push_back(make_pair(a - 1, ((long long)E[a - 1].size()) - 1));
    base[a - 1][b - 1] = base[b - 1][a - 1] = true;
  }
  for (long long i = 0; i < ((long long)1000); i++) used[i] = queued[i] = false;
  for (long long i = 0; i < ((long long)n); i++)
    if (!used[i]) dfs(i);
  for (long long i = 0; i < ((long long)1000); i++) used[i] = false;
  vector<long long> top;
  for (long long i = 0; i < ((long long)n); i++)
    if (!used[i] && !deleted[i]) {
      cal(i);
      top.push_back(i);
    }
  if (1 < ((long long)top.size()))
    for (long long i = 0; i < ((long long)((long long)top.size())); i++)
      ans.push_back(make_pair(top[i], top[(i + 1) % ((long long)top.size())]));
  for (long long i = 0; i < ((long long)((long long)ans.size())); i++) {
    bool ok = false;
    long long j, k;
    set<long long>::iterator it0, it1;
    for (it0 = compact[ans[i].first].begin();
         it0 != compact[ans[i].first].end() && !ok; it0++) {
      for (it1 = compact[ans[i].second].begin();
           it1 != compact[ans[i].second].end() && !ok; it1++) {
        if (!base[*it0][*it1]) ok = true;
      }
    }
    it0--, it1--;
    if (!ok) {
      cout << "-1" << endl;
      return 0;
    }
    ans[i] = make_pair(*it0, *it1);
  }
  cout << ((long long)ans.size()) << endl;
  for (long long i = 0; i < ((long long)((long long)ans.size())); i++)
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << endl;
}