#include <bits/stdc++.h>
using namespace std;
long long KuriBija[1005];
long long A;
long long Cik, lol;
int main() {
  cin >> Cik >> lol;
  for (long long i = 0; i < lol; i++) {
    cin >> A;
    KuriBija[A] = 1;
    cin >> A;
    KuriBija[A] = 1;
  }
  lol = 1;
  while (KuriBija[lol] != 0) {
    lol++;
  }
  cout << Cik - 1 << endl;
  for (long long i = 0; i < Cik; i++) {
    if (i + 1 != lol) {
      cout << lol << ' ' << i + 1 << endl;
    }
  }
}
