#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 10;
const int M = 100000 + 10;
int mark[N], h[N], cut[M], dp[N], st[N], par[N], sz[N], t;
pair<int, int> E[M];
vector<pair<int, int> > adj[N];
vector<int> T[N], vec;
int getPar(int v) { return (par[v] == v ? v : par[v] = getPar(par[v])); }
void merge(int u, int v) {
  u = getPar(u);
  v = getPar(v);
  if (u == v) return;
  if (sz[v] < sz[u]) swap(u, v);
  par[u] = v;
  sz[v] += sz[u];
}
void dfs0(int v, int p) {
  mark[v] = 1;
  dp[v] = h[v];
  for (pair<int, int> e : adj[v]) {
    int u = e.first, id = e.second;
    if (id == p) continue;
    if (!mark[u]) {
      h[u] = h[v] + 1;
      dfs0(u, id);
      if (h[u] <= dp[u]) cut[id] = 1;
      dp[v] = min(dp[v], dp[u]);
    } else
      dp[v] = min(dp[v], h[u]);
  }
}
void dfs1(int v, int p) {
  st[v] = t++;
  for (int u : T[v])
    if (u != p) dfs1(u, v);
}
bool cmp(int x, int y) { return st[x] < st[y]; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(make_pair(v, i));
    adj[v].push_back(make_pair(u, i));
    E[i] = make_pair(u, v);
  }
  dfs0(1, -1);
  for (int i = 0; i < N; i++) par[i] = i, sz[i] = 1;
  for (int i = 0; i < m; i++)
    if (cut[i] == 0) merge(E[i].first, E[i].second);
  for (int i = 0; i < m; i++) {
    if (cut[i] == 0) continue;
    int u = getPar(E[i].first), v = getPar(E[i].second);
    T[u].push_back(v);
    T[v].push_back(u);
  }
  int x = 1;
  for (int i = 1; i <= n; i++) {
    if (getPar(i) != i) continue;
    if (1 < (int)(T[i].size()))
      x = i;
    else
      vec.push_back(i);
  }
  dfs1(x, -1);
  sort((vec).begin(), (vec).end(), cmp);
  if (n == 2) return cout << -1, 0;
  if ((int)(vec.size()) == 1) return cout << 0, 0;
  cout << ((int)(vec.size()) + 1) / 2 << '\n';
  for (int i = 0; i < ((int)(vec.size()) + 1) / 2; i++)
    cout << vec[i] << ' ' << vec[i + (int)(vec.size()) / 2] << '\n';
  return 0;
}
