#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(m * 2);
  for (int i = 0; i < m * 2; ++i) cin >> v[i];
  int x = n;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  for (int i = 0; i < v.size(); ++i) {
    if (i + 1 != v[i]) {
      x = i + 1;
      break;
    }
  }
  cout << n - 1 << endl;
  for (int j = 1; j <= n; ++j) {
    if (j == x) continue;
    cout << x << ' ' << j << endl;
  }
  return 0;
}
