#include <bits/stdc++.h>
using namespace std;
class Bridges {
 public:
  Bridges(vector<vector<int> > h) {
    g = h;
    int n = (int)(g).size();
    used.assign(n, false);
    ret.resize(n);
    tin.resize(n);
    timer = 0;
    dfs(0, 0);
    int cc = 0;
    compId.assign(n, -1);
    for (int i = 0; i < n; ++i) {
      if (compId[i] != -1) {
        continue;
      }
      vector<int> vis;
      compId[i] = cc;
      queue<int> q;
      q.push(i);
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        vis.push_back(v);
        for (int to : g[v]) {
          if (bridges.count({v, to})) {
            continue;
          }
          if (compId[to] != -1) {
            continue;
          }
          compId[to] = cc;
          q.push(to);
        }
      }
      comps.push_back(vis);
      ++cc;
    }
    tree.resize(cc);
    for (auto it : bridges) {
      int u = it.first, v = it.second;
      u = compId[u], v = compId[v];
      if (u < v) {
        tree[u].push_back(v);
        tree[v].push_back(u);
      }
    }
  }
  void get(vector<vector<int> >& a, vector<vector<int> >& b) {
    a = comps;
    b = tree;
  }

 private:
  vector<vector<int> > g;
  vector<bool> used;
  vector<int> ret;
  vector<int> tin;
  int timer;
  set<pair<int, int> > bridges;
  vector<vector<int> > comps;
  vector<int> compId;
  vector<vector<int> > tree;
  void dfs(int v, int p) {
    tin[v] = ret[v] = timer++;
    used[v] = true;
    for (int to : g[v]) {
      if (to == p) {
        continue;
      }
      if (used[to]) {
        ret[v] = min(ret[v], tin[to]);
      } else {
        dfs(to, v);
        ret[v] = min(ret[v], ret[to]);
        if (ret[to] > tin[v]) {
          bridges.insert({to, v});
          bridges.insert({v, to});
        }
      }
    }
  }
};
void add(vector<pair<int, int> >& ans, const vector<int>& a,
         const vector<int>& b, const set<pair<int, int> >& setik) {
  for (int x : a) {
    for (int y : b) {
      if (!setik.count({x, y})) {
        ans.push_back({x, y});
        return;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int> > g(n);
  set<pair<int, int> > setik;
  while (m--) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    setik.insert({u, v});
    setik.insert({v, u});
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (n == 2) {
    cout << "-1\n";
    return 0;
  }
  Bridges B(g);
  vector<vector<int> > comps;
  B.get(comps, g);
  n = (int)(comps).size();
  assert(n == (int)(g).size());
  if (n == 1) {
    cout << "0\n";
    return 0;
  }
  if (n == 2) {
    for (int x : comps[0]) {
      for (int y : comps[1]) {
        if (!setik.count({x, y})) {
          cout << "1\n";
          cout << x + 1 << " " << y + 1 << "\n";
          return 0;
        }
      }
    }
  }
  int r;
  for (int i = 0; i < n; ++i) {
    if ((int)(g[i]).size() > 1) {
      r = i;
    }
  }
  vector<bool> alive(n, true);
  vector<pair<int, int> > ans;
  while (true) {
    vector<vector<int> > vct;
    vector<bool> used(n, false);
    used[r] = true;
    for (int son : g[r]) {
      if (!alive[son]) {
        continue;
      }
      vector<int> curr;
      used[son] = true;
      queue<int> q;
      q.push(son);
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        if (alive[v] && (int)(g[v]).size() == 1) {
          curr.push_back(v);
        }
        for (int to : g[v]) {
          if (!used[to]) {
            q.push(to);
            used[to] = true;
          }
        }
      }
      if (!curr.empty()) {
        curr.push_back(son);
        vct.push_back(curr);
      }
    }
    alive[r] = false;
    sort((vct).begin(), (vct).end(),
         [&](const vector<int>& x, const vector<int>& y) {
           return (int)(x).size() > (int)(y).size();
         });
    vector<int> par;
    for (int i = 0; i < (int)(vct).size(); ++i) {
      par.push_back(vct[i].back());
      vct[i].pop_back();
    }
    int sum = 0;
    for (int i = 1; i < (int)(vct).size(); ++i) {
      sum += (int)(vct[i]).size();
    }
    int arb = -1;
    int done = 0;
    int init = sum + (int)(vct[0]).size();
    while (true) {
      int max1 = -1, max2 = -1;
      for (int i = 0; i < (int)(vct).size(); ++i) {
        if (vct[i].empty()) {
          continue;
        }
        if (max1 == -1 || (int)(vct[i]).size() > (int)(vct[max1]).size()) {
          max2 = max1;
          max1 = i;
        } else if (max2 == -1 ||
                   (int)(vct[i]).size() > (int)(vct[max2]).size()) {
          max2 = i;
        }
      }
      if (max1 == -1 || max2 == -1) {
        break;
      }
      arb = vct[max1].back();
      add(ans, comps[vct[max1].back()], comps[vct[max2].back()], setik);
      alive[vct[max1].back()] = false;
      vct[max1].pop_back();
      alive[vct[max2].back()] = false;
      vct[max2].pop_back();
      done += 2;
    }
    if (done == init) {
      break;
    }
    if (done == init - 1) {
      for (int i = 0; i < (int)(vct).size(); ++i) {
        if (vct[i].empty()) {
          continue;
        }
        add(ans, comps[vct[i].back()], comps[arb], setik);
        alive[vct[i].back()] = false;
      }
      break;
    } else {
      r = par[0];
    }
  }
  cout << (int)(ans).size() << "\n";
  for (int i = 0; i < (int)(ans).size(); ++i) {
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << "\n";
  }
}
