#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, MOD = 1e9 + 7;
int P[N], second[N], first[N], B[N], H[N], mn[N], M[N], n, m, timer = 0;
vector<pair<int, int> > adj[N], L;
pair<int, int> E[N];
void preDFS(int v, int p = -1) {
  mn[v] = H[v];
  M[v] = 1;
  for (pair<int, int> u : adj[v]) {
    if (!M[u.first]) {
      H[u.first] = H[v] + 1;
      preDFS(u.first, v);
      mn[v] = min(mn[v], mn[u.first]);
      if (mn[u.first] >= H[u.first]) B[u.second] = 1;
    } else if (u.first != p)
      mn[v] = min(mn[v], H[u.first]);
  }
}
int Find(int v) { return !P[v] ? v : P[v] = Find(P[v]); }
void Union(int u, int v) {
  u = Find(u), v = Find(v);
  if (u != v) P[u] = v;
  return;
}
void DFS(int v, int p = -1) {
  second[v] = timer++;
  for (pair<int, int> u : adj[v]) {
    if (u.first != p) DFS(u.first, v);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  if (n == 2) return !printf("-1\n");
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back({v, i});
    E[i] = {u, v};
    adj[v].push_back({u, i});
  }
  preDFS(1);
  for (int i = 1; i <= m; i++) {
    if (!B[i]) Union(E[i].first, E[i].second);
  }
  for (int i = 1; i <= n; i++) adj[i] = {};
  for (int i = 1; i <= m; i++) {
    if (B[i]) {
      int u = Find(E[i].first), v = Find(E[i].second);
      adj[u].push_back({v, i});
      adj[v].push_back({u, i});
    }
  }
  int rt = 1;
  for (int i = 1; i <= n; i++)
    if (i == Find(i) && (int)adj[i].size() > 1) rt = i;
  DFS(rt);
  for (int i = 1; i <= n; i++) {
    if (i != Find(i)) continue;
    if ((int)adj[i].size() == 1) L.push_back({second[i], i});
  }
  sort(L.begin(), L.end());
  if (!(int)L.size()) return !printf("0\n");
  printf("%d\n", ((int)L.size() + 1) / 2);
  for (int i = 0; i < ((int)L.size() + 1) / 2; i++) {
    printf("%d %d\n", L[i].second, L[i + (int)L.size() / 2].second);
  }
  return 0;
}
