#include <bits/stdc++.h>
using namespace std;
int vet[1010];
vector<int> grafo[1010];
vector<pair<int, int> > resp;
int dist1[1010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    vet[a]++;
    vet[b]++;
    grafo[a].push_back(b);
    grafo[b].push_back(a);
  }
  pair<int, int> menor = make_pair(0x3f3f3f3f, 0x3f3f3f3f);
  for (int i = 1; i <= n; i++) {
    if (vet[i] < menor.second) {
      menor.first = i;
      menor.second = vet[i];
    }
  }
  int o = 0;
  for (int i = 1; i <= n; i++) {
    if (vet[i] == 1) {
      o++;
    }
  }
  if (o == n) {
    int vert[1010];
    memset(vert, 0, sizeof vert);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (j == i) continue;
        if (vert[i] == 2)
          continue;
        else {
          if (grafo[i][0] == j) continue;
          if (vert[j] == 2) continue;
          resp.push_back(make_pair(i, j));
          vert[i]++;
          vert[j]++;
        }
      }
    }
  } else {
    for (int i = 1; i <= n; i++) {
      bool x = 0;
      if (i == menor.first) {
        continue;
      }
      for (int j = 0; j < grafo[i].size(); j++) {
        if (grafo[i][j] == menor.first) {
          x = 1;
          break;
        }
      }
      if (x == 0) {
        resp.push_back(make_pair(menor.first, i));
        dist1[i] = 1;
      }
      if (x == 1) {
        int k = 1;
        while (true) {
          if (grafo[i][k] == k) {
            k++;
            continue;
          } else {
            if (dist1[k] == 1) {
              resp.push_back(make_pair(k, i));
              break;
            }
          }
        }
      }
    }
  }
  cout << resp.size() << endl;
  for (int i = 0; i < resp.size(); i++) {
    cout << resp[i].first << " " << resp[i].second << endl;
  }
  return 0;
}
