#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, b, x = 1;
  map<int, int> f;
  cin >> n >> m;
  while (m--) {
    cin >> a >> b;
    f[a] = 1;
    f[b] = 1;
  }
  while (f[x]) {
    x++;
  }
  cout << n - 1 << endl;
  for (int i = 1; i < x; i++) {
    cout << i << " " << x << endl;
  }
  for (int i = n; i > x; i--) {
    cout << i << " " << x << endl;
  }
  return 0;
}
