#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;
}
