#include <bits/stdc++.h>
using namespace std;
const int maxn = 900 + 10, maxm = 1e5 + 100;
int h[maxn], dp[maxn], d[maxn][maxn], p[maxn], st[maxn], cnt = 0;
bool iscutedge[maxm], mark[maxn];
vector<pair<int, int> > g[maxn], graph[maxn];
vector<int> tree[maxn], leaf;
inline void dfs(int v, int pp = 0, int id = 0) {
  mark[v] = 1;
  dp[v] = h[v];
  for (auto u : g[v]) {
    if (!mark[u.first]) {
      h[u.first] = h[v] + 1;
      dfs(u.first, v, u.second);
      dp[v] = min(dp[v], dp[u.first]);
    } else if (u.first != pp) {
      dp[v] = min(dp[v], h[u.first]);
    }
  }
  if (v != 1 && dp[v] == h[v]) {
    iscutedge[id] = true;
  }
}
inline void dijkstra(int v) {
  for (int i = 0; i < maxn; ++i) {
    d[v][i] = 1e9;
  }
  d[v][v] = 0;
  set<pair<int, int> > st;
  st.insert({0, v});
  while (!st.empty()) {
    int u = st.begin()->second;
    st.erase(st.begin());
    for (auto w : graph[u]) {
      if (d[v][w.first] > d[v][u] + w.second) {
        d[v][w.first] = d[v][u] + w.second;
        st.insert({d[v][w.first], w.first});
      }
    }
  }
}
inline int getpar(int a) { return (p[a] == a ? a : p[a] = getpar(p[a])); }
inline void DFS(int v, int pp = 0) {
  st[v] = cnt++;
  mark[v] = 1;
  if (tree[v].size() == 1) {
    leaf.push_back(v);
  }
  for (auto u : tree[v]) {
    if (!mark[u]) {
      DFS(u, v);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  if (n == 2 && m == 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back({v, i});
    g[v].push_back({u, i});
  }
  dfs(1);
  for (int i = 1; i <= n; ++i) {
    for (auto u : g[i]) {
      if (iscutedge[u.second] == 1) {
        graph[i].push_back({u.first, 1});
      } else {
        graph[i].push_back({u.first, 0});
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    dijkstra(i);
  }
  for (int i = 1; i <= n; ++i) {
    p[i] = i;
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (d[i][j] == 0) {
        p[getpar(i)] = getpar(j);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    p[i] = getpar(i);
  }
  for (int i = 1; i <= n; ++i) {
    for (auto u : g[i]) {
      if (iscutedge[u.second] == 1) {
        int j = u.first;
        tree[p[i]].push_back(p[j]);
      }
    }
  }
  fill(mark, mark + maxn, 0);
  for (int i = 1; i <= n; ++i) {
    if (!mark[i]) {
      DFS(i);
    }
  }
  cout << (leaf.size() + 1) / 2 << endl;
  for (int i = 0; i < leaf.size() / 2; ++i) {
    cout << leaf[i] << ' ' << leaf[i + leaf.size() / 2] << endl;
  }
  if (leaf.size() & 1) {
    cout << leaf[0] << ' ' << leaf.back() << endl;
  }
  return 0;
}
