#include <bits/stdc++.h>
int a[1200];
int main() {
  int x, y, i, j, k, carry, m, l, n, q, w, e;
  while (scanf("%d%d", &n, &m) != EOF) {
    for (i = 1; i <= m; i++) {
      scanf("%d%d", &x, &y);
      a[x]++;
      a[y]++;
    }
    for (i = 1; i <= n; i++) {
      if (a[i] == 0) {
        carry = i;
        break;
      }
    }
    printf("%d\n", n - 1);
    for (i = 1; i <= n; i++) {
      if (i == carry)
        continue;
      else
        printf("%d %d\n", i, carry);
    }
  }
  return 0;
}
