#include <bits/stdc++.h>
using namespace std;
int isprime(long long int n) {
  long long int i;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return 0;
  return 1;
}
bool cmp(string i, string j) { return i + j < j + i; }
string ConvertItoS(long long int n) {
  stringstream a;
  a << n;
  return a.str();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  map<long long int, long long int>(p);
  long long int n, m, a, b, cnt = 0;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    p[a]++;
    p[b]++;
  }
  for (int i = 1; i <= n; i++) {
    if (p[i] == 0) {
      a = i;
      break;
    }
  }
  for (int i = 1; i <= n; i++)
    if (a != i) cnt++;
  cout << cnt << endl;
  ;
  for (int i = 1; i <= n; i++)
    if (a != i) cout << a << " " << i << endl;
  return 0;
}
