#include <bits/stdc++.h>
using namespace std;
const int MX = 900 + 10, MXM = 1e5 + 10, MD = 1e9 + 7;
int n, m, a[MX], ans, tmp, h[MX], col = 1, color[MX], U[MXM], V[MXM];
vector<int> adj[MX], radj[MX], tmp_adj[MX], cp[MX], topol, leaves;
bool edge[MX][MX], mark[MX];
void pre_dfs(int v = 0) {
  mark[v] = 1;
  for (auto u : tmp_adj[v]) {
    if (mark[u] && h[u] < h[v] - 1) {
      adj[v].push_back(u);
      radj[u].push_back(v);
    } else if (!mark[u]) {
      h[u] = h[v] + 1;
      pre_dfs(u);
      adj[v].push_back(u);
      radj[u].push_back(v);
    }
  }
}
void dfs(int v) {
  mark[v] = 1;
  for (auto u : adj[v])
    if (!mark[u]) dfs(u);
  topol.push_back(v);
}
void sfd(int v) {
  color[v] = col;
  for (auto u : radj[v])
    if (!color[u]) sfd(u);
}
void final_dfs(int v = 0, int p = -1) {
  for (auto u : adj[v]) {
    if (u == p) continue;
    final_dfs(u, v);
  }
  if (adj[v].size() == 1) leaves.push_back(v);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &U[i], &V[i]);
    U[i]--;
    V[i]--;
    tmp_adj[U[i]].push_back(V[i]);
    tmp_adj[V[i]].push_back(U[i]);
    edge[min(U[i], V[i])][max(U[i], V[i])] = 1;
  }
  pre_dfs();
  memset((mark), 0, sizeof(mark));
  memset((h), 0, sizeof(h));
  for (int i = 0; i < n; i++)
    if (!mark[i]) dfs(i);
  reverse(topol.begin(), topol.end());
  for (auto v : topol)
    if (!color[v]) sfd(v), col++;
  topol.clear();
  for (int i = 0; i < n; i++) cp[color[i]].push_back(i);
  for (int i = 0; i < n; i++) {
    adj[i].clear();
    radj[i].clear();
    tmp_adj[i].clear();
  }
  int id = -1;
  for (int i = 0; i < m; i++) {
    int v = V[i], u = U[i];
    if (color[v] != color[u]) {
      adj[color[v]].push_back(color[u]);
      adj[color[u]].push_back(color[v]);
      if (adj[color[v]].size() > 1) id = color[v];
      if (adj[color[u]].size() > 1) id = color[u];
    }
  }
  if (col == 2) {
    printf("0");
    return 0;
  }
  if (id == -1) {
    for (auto pa : cp[1])
      for (auto pa2 : cp[2])
        if (!edge[min(pa, pa2)][max(pa2, pa2)]) {
          printf("1\n%d %d", pa + 1, pa2 + 1);
          return 0;
        }
    printf("-1");
    return 0;
  } else {
    final_dfs(id);
    int cnt = leaves.size();
    printf("%d\n", cnt / 2 + (cnt % 2 > 0));
    for (int i = 0; i < cnt / 2 + (cnt % 2 > 0); i++) {
      int u = leaves[i], v = leaves[min(i + cnt / 2 + (cnt % 2 > 0), cnt - 1)];
      int flag = 0;
      for (auto pa : cp[v]) {
        for (auto pa2 : cp[u]) {
          if (!edge[min(pa, pa2)][max(pa2, pa2)])
            printf("%d %d\n", pa + 1, pa2 + 1), flag = 1;
          if (flag) break;
        }
        if (flag) break;
      }
    }
  }
}
