#include <bits/stdc++.h>
using namespace std;
class sp {
 public:
  int q, e;
  sp *w;
  sp(int q1, sp *w1, int e1) {
    q = q1;
    w = w1;
    e = e1;
  }
};
sp *a[1000];
int mx1, mx2, s[1000], f[1000], h1[100000], h2[100000];
bool h[900][900];
int k(int w) {
  if (f[w] != w) f[w] = k(f[w]);
  return f[w];
}
void l(int q, int w, int t) {
  s[q] = t;
  sp *c;
  int e = q;
  for (c = a[q]; c; c = c->w)
    if (c->e != w) {
      if (s[c->q] == -1) l(c->q, c->e, t + 1);
      if ((s[k(c->q)] > 0) && (s[k(c->q)] < t))
        if (s[e] > s[k(c->q)]) e = k(c->q);
    }
  f[q] = e;
  s[q] = -2;
}
void dfs(int q, int w, int t) {
  if (s[q] == 1)
    if (t > mx2) {
      mx1 = q;
      mx2 = t;
    }
  for (sp *c = a[q]; c; c = c->w)
    if (c->q != w)
      if (k(q) != k(c->q))
        dfs(c->q, q, t + 1);
      else
        dfs(c->q, q, t);
}
bool dfs1(int q, int w) {
  if (q == mx1) return 1;
  for (sp *c = a[q]; c; c = c->w)
    if (c->q != w)
      if (dfs1(c->q, q)) {
        f[k(q)] = k(mx1);
        return 1;
      }
}
int main() {
  int q, w, e, r, t, c, v, y = 0;
  scanf("%d%d", &q, &w);
  if (q == 2) {
    printf("-1");
    return 0;
  }
  for (e = 0; e < q; e++) {
    for (r = 0; r < q; r++) h[e][r] = 0;
    h[e][e] = 1;
  }
  for (e = 0; e < q; e++) {
    a[e] = 0;
    f[e] = e;
    s[e] = -1;
  }
  for (e = 0; e < w; e++) {
    scanf("%d%d", &h1[e], &h2[e]);
    h1[e]--;
    h2[e]--;
    a[h1[e]] = new sp(h2[e], a[h1[e]], e);
    a[h2[e]] = new sp(h1[e], a[h2[e]], e);
    h[h1[e]][h2[e]] = h[h2[e]][h1[2]] = 1;
  }
  l(0, -1, 1);
  for (e = 0; e < q; e++) {
    a[e] = 0;
    s[e] = 0;
  }
  for (e = 0; e < w; e++) {
    h1[e] = k(h1[e]);
    h2[e] = k(h2[e]);
    if (h1[e] != h2[e]) {
      a[h1[e]] = new sp(h2[e], a[h1[e]], e);
      a[h2[e]] = new sp(h1[e], a[h2[e]], e);
      s[h1[e]]++;
      s[h2[e]]++;
    }
  }
  for (e = 0; e < q; e++)
    if (s[e] == 1) {
      mx2 = -1;
      dfs(e, -1, 0);
      if (h[e][mx1]) {
        for (c = 0; c < q; c++)
          for (v = 0; v < q; v++)
            if ((!h[c][v]) && ((k(c) == k(e)) && (k(v) != k(e)))) goto st;
      st:
        h1[y] = c;
        h2[y] = v;
        y++;
        break;
      }
      h1[y] = e;
      h2[y] = mx1;
      y++;
      s[e]++;
      s[mx1]++;
      r = dfs1(e, -1);
    }
  printf("%d\n", y);
  for (w = 0; w < y; w++) printf("%d %d\n", h1[w] + 1, h2[w] + 1);
  return 0;
}
