#include <bits/stdc++.h>
using namespace std;
vector<long long int> v, w, uu;
map<long long int, long long int> u;
void Y() {
  cout << "YES"
       << "\n";
}
void N() {
  cout << "NO"
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, i, j, k, p, q, o, l, s, t, z = 0, r;
  string a, b, c;
  double x, y;
  vector<string> vv;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> p >> q;
    u[p]++;
    u[q]++;
  }
  for (i = 1; i <= n; i++) {
    if (u[i] == 0) {
      k = i;
      break;
    }
  }
  cout << n - 1 << "\n";
  for (i = 1; i <= n; i++) {
    if (i != k) {
      cout << i << " " << k << "\n";
    }
  }
  return 0;
}
