#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> vec(n, 0);
  for (long long a = 0; a < m; a++) {
    long long x, y;
    cin >> x;
    cin >> y;
    vec.at(x - 1)++;
    vec.at(y - 1)++;
  }
  long long z;
  for (long long a = 0; a < n; a++) {
    if (vec.at(a) == 0) {
      z = a + 1;
      break;
    }
  }
  cout << n - 1 << endl;
  for (long long a = 0; a < n; a++) {
    if (a != z - 1) cout << z << " " << a + 1 << endl;
  }
}
