#include <bits/stdc++.h>
using namespace std;
int main() {
  bool used[10009];
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    used[x] = true;
    used[y] = true;
  }
  int a = 1;
  for (int i = 1; i <= n; i++) {
    if (!used[i]) {
      a = i;
      break;
    }
  }
  vector<pair<int, int> > ansz;
  for (int i = 1; i <= n; i++) {
    if (i != a) {
      pair<int, int> z;
      z.first = a;
      z.second = i;
      ansz.push_back(z);
    }
  }
  cout << ansz.size() << endl;
  for (int i = 0; i < ansz.size(); i++) {
    pair<int, int> z;
    z = ansz[i];
    cout << z.first << ' ' << z.second << endl;
  }
  return 0;
}
