#include <bits/stdc++.h>
using namespace std;
int fx[] = {0, 0, +1, -1};
int fy[] = {+1, -1, 0, 0};
const int MOD = 1e9 + 7;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    long long t = bigmod(p, e / 2, M);
    return (T)((t * t) % M);
  }
  return (T)(((long long)bigmod(p, e - 1, M) * (long long)(p)) % M);
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
int arr[1000009] = {0}, brr[1000009];
int main() {
  int a, b, cnt = 0, sum = 0, i, j, hand, flag = 0, c, n, m, k, t, res,
            maxy = 0;
  while (cin >> n >> m) {
    for (i = 0; i < m; i++) {
      cin >> a >> b;
      arr[a]++;
      arr[b]++;
    }
    for (i = 1; i <= n; i++) {
      if (arr[i] == 0) {
        hand = i;
        break;
      }
    }
    cout << n - 1 << endl;
    for (i = 0; i < n; i++) {
      if (hand != i + 1) cout << hand << " " << i + 1 << endl;
    }
  }
}
