#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int vst[14][14];
int can[1 << 14][14][14];
int cycle[1 << 14];
pair<int, int> pre[1 << 14];
int pp[1 << 14][14][14];
bitset<91> mn[1 << 14];
pair<int, int> ppp[1 << 14];
bitset<91> edges[1 << 14];
int id[14][14];
pair<int, int> p[91];
int main() {
  int n, m;
  gn(n, m);
  for (int i = 0; i < m; i++) {
    int u, v;
    gn(u, v);
    u--;
    v--;
    vst[u][v] = vst[v][u] = 1;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      p[cnt] = pair<int, int>(i, j), id[i][j] = id[j][i] = cnt++;
  for (int i = 1; i < 1 << n; i++) {
    if (__builtin_popcount(i) == 1) {
      int u = __builtin_ctz(i);
      can[i][u][u] = 1;
      continue;
    }
    for (int u = 0; u < n; u++)
      if ((i >> u) & 1) {
        for (int v = 0; v < n; v++)
          if ((i >> v) & 1) {
            for (int k = 0; k < n; k++)
              if ((i >> k) & 1) {
                if (u != v && k != v) {
                  if (can[i ^ (1 << v)][u][k] && vst[k][v]) {
                    can[i][u][v] = 1;
                    pp[i][u][v] = k;
                  }
                }
              }
          }
      }
  }
  for (int i = 1; i < 1 << n; i++) {
    for (int u = 0; u < n; u++) {
      for (int v = 0; v < n; v++) {
        if (can[i][u][v] && vst[u][v] && __builtin_popcount(i) > 2) {
          cycle[i] = 1;
          int tmpv = v;
          int cc = i;
          edges[i].reset();
          edges[i].set(id[v][u]);
          while (u != v) {
            int vv = pp[cc][u][v];
            cc ^= (1 << v);
            edges[i].set(id[v][vv]);
            v = vv;
          }
          v = tmpv;
        }
      }
    }
  }
  for (int i = 1; i < 1 << n; i++) mn[i].set();
  for (int i = 1; i < 1 << n; i++)
    if (cycle[i]) {
      mn[i] = edges[i];
      ppp[i] = pair<int, int>(0, i);
    }
  int M = 1 << n;
  int xxx = 0;
  for (int i = 1; i < M; i++) {
    for (int j = 1; j < M; j++)
      if (!cycle[i | j] && cycle[j] && (i & j) && (i | j) > i) {
        if (mn[i | j].count() > (mn[i] | edges[j]).count()) {
          mn[i | j] = mn[i] | edges[j];
          ppp[i | j] = pair<int, int>(i, j);
        }
      }
  }
  printf("%d\n", mn[M - 1].count());
  for (int i = 0; i < 91; i++)
    if (mn[M - 1][i]) printf("%d %d\n", p[i].first + 1, p[i].second + 1);
  return 0;
}
