#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v;
  while (m--) {
    int a, b;
    cin >> a >> b;
    v.push_back(a);
    v.push_back(b);
  }
  int center = 1;
  while (count(v.begin(), v.end(), center)) {
    center++;
  }
  cout << n - 1 << "\n";
  for (int i = 1; i <= n; i++) {
    if (i != center) {
      cout << center << " " << i << "\n";
    }
  }
}
