#include <bits/stdc++.h>
using namespace std;
const int maxn = 9e2 + 1;
int n, m, g[maxn], G, o1[maxn], o2[maxn], deg[maxn];
vector<int> e[maxn], e_s[maxn], r_e_s[maxn], topo, ans, wow[maxn];
vector<pair<int, int> > edge, res;
bool mark[maxn];
map<int, int> is[maxn];
void dfs(int v) {
  mark[v] = 1;
  for (auto u : e[v]) {
    if (is[v][u] == 0) {
      e_s[v].push_back(u);
      r_e_s[u].push_back(v);
      is[v][u] = 1;
      is[u][v] = 1;
    }
    if (mark[u] == 0) {
      dfs(u);
    }
  }
}
void topol(int v) {
  mark[v] = 1;
  for (auto u : e_s[v]) {
    if (mark[u] == 0) {
      topol(u);
    }
  }
  topo.push_back(v);
}
void col(int v) {
  mark[v] = 1;
  g[v] = G;
  o2[G] = v;
  for (auto u : r_e_s[v]) {
    if (mark[u] == 0) {
      col(u);
    }
  }
  return;
}
void Last_one(int v) {
  mark[v] = 1;
  for (auto u : wow[v]) {
    if (mark[u] == 0) {
      Last_one(u);
    }
  }
  if (deg[v] == 1) {
    ans.push_back(v);
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  if (n == 2) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    int t1, t2;
    cin >> t1 >> t2;
    e[t1].push_back(t2);
    e[t2].push_back(t1);
    edge.push_back({t1, t2});
  }
  dfs(1);
  for (int i = 1; i <= n; i++) {
    mark[i] = 0;
  }
  topol(1);
  for (int i = 1; i <= n; i++) {
    mark[i] = 0;
  }
  reverse(topo.begin(), topo.end());
  G = 1;
  for (auto u : topo) {
    if (mark[u] == 0) {
      o1[G] = u;
      col(u);
      G++;
    }
  }
  for (auto tmp : edge) {
    if (g[tmp.first] != g[tmp.second]) {
      deg[g[tmp.first]]++;
      deg[g[tmp.second]]++;
      wow[g[tmp.first]].push_back(g[tmp.second]);
      wow[g[tmp.second]].push_back(g[tmp.first]);
    }
  }
  if (G == 3) {
    ans.push_back(1);
    ans.push_back(2);
  } else {
    for (int i = 1; i <= n; i++) {
      mark[i] = 0;
    }
    for (int i = 1; i < G; i++) {
      if (deg[i] >= 2) {
        Last_one(i);
        break;
      }
    }
  }
  for (int i = 0; i < ((int)ans.size() + 1) / 2; i++) {
    int t1 = ans[i];
    int t2 = ans[i + (ans.size()) / 2];
    if (is[o1[t1]][o1[t2]] == 0) {
      res.push_back({o1[t1], o1[t2]});
    } else {
      res.push_back({o2[t1], o2[t2]});
    }
  }
  cout << res.size() << endl;
  for (auto u : res) {
    cout << u.first << "  " << u.second << endl;
  }
  return 0;
}
