#include <bits/stdc++.h>
using namespace std;
const int N = 9e2 + 5, Mod = 1e9 + 7, Lg = 27, P = 727, Sq = 350;
const long long Inf = 3e18 + 10;
bool Mark[N], Cut[N], E[N][N];
vector<int> A[N], B[N], CE, Cmp[N], Adj[N], Le;
int Par[N], Dp[N], H[N], Col[N], Find[N], D[N], Cnt = 1, n, m;
void PreDfs(int u) {
  Mark[u] = 1;
  for (int i = 0; i < (int)A[u].size(); i++) {
    int v = A[u][i];
    if (Mark[v]) {
      if (v ^ Par[u]) {
        Dp[u] = min(Dp[u], H[v]);
      }
    } else {
      Par[v] = u, H[v] = H[u] + 1;
      PreDfs(v);
      Dp[u] = min(Dp[u], Dp[v]);
    }
  }
  if (Dp[u] >= H[u]) {
    Cut[u] = 1;
  }
}
void Dfs(int u) {
  Col[u] = Cnt;
  for (int i = 0; i < (int)B[u].size(); i++) {
    int v = B[u][i];
    if (!Col[v]) {
      Dfs(v);
    }
  }
}
void Dfs2(int u, int par) {
  int Num = 0;
  for (int i = 0; i < (int)Adj[u].size(); i++) {
    if (Adj[u][i] != par) {
      Num++;
      Dfs2(Adj[u][i], u);
    }
  }
  if (!Num) {
    Le.push_back(u);
  }
}
int main() {
  memset(Dp, 63, sizeof(Dp));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    A[x].push_back(y), A[y].push_back(x);
    E[x][y] = E[y][x] = 1;
  }
  PreDfs(1);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < (int)A[i].size(); j++) {
      if (H[i] < H[A[i][j]]) {
        continue;
      }
      if (Cut[i] && !(A[i][j] ^ Par[i])) {
        CE.push_back(i);
        continue;
      } else {
        B[i].push_back(A[i][j]);
        B[A[i][j]].push_back(i);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!Col[i]) {
      Dfs(i);
      Find[Cnt] = i;
      Cnt++;
    }
    Cmp[Col[i]].push_back(i);
  }
  Cnt--;
  if (Cnt == 1) {
    printf("%d", 0);
    return 0;
  }
  if (Cnt == 2) {
    for (int i = 0; i < (int)Cmp[1].size(); i++) {
      for (int j = 0; j < (int)Cmp[2].size(); j++) {
        if (E[Cmp[1][i]][Cmp[2][j]]) {
          continue;
        }
        printf("%d\n%d %d", 1, Cmp[1][i], Cmp[2][j]);
        return 0;
      }
    }
    printf("%d", -1);
    return 0;
  }
  for (int i = 0; i < (int)CE.size(); i++) {
    int u = CE[i], v = Par[u];
    Adj[Col[u]].push_back(Col[v]);
    Adj[Col[v]].push_back(Col[u]);
  }
  int Best = 0;
  for (int i = 1; i <= Cnt; i++) {
    if (Adj[i].size() > 1) {
      Best = i;
    }
  }
  Dfs2(Best, Best);
  int T = (int)Le.size();
  printf("%d\n", (T + 1) / 2);
  T /= 2;
  for (int i = 0; i + T < (int)Le.size(); i++) {
    printf("%d %d\n", Find[Le[i]], Find[Le[i + T]]);
  }
  return 0;
}
