#include <bits/stdc++.h>
using namespace std;
int main() {
  int ar[1010]{0};
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    ar[i] = a;
    ar[i + m] = b;
  }
  long long k{0}, r, x{0};
  for (int i = 1; i < n + 1; i++) {
    r = count(ar, ar + 1010, i);
    if (r == 0) {
      k = i;
      break;
    }
  }
  for (int i = 1; i < n + 1; i++) {
    if (i != k) {
      x++;
    }
  }
  cout << x << endl;
  for (int i = 1; i < n + 1; i++) {
    if (i != k) {
      cout << k << " " << i << endl;
    }
  }
  return 0;
}
