#include <bits/stdc++.h>
using namespace std;
int n, m, per[101000];
map<pair<int, int>, int> fail;
int main(int argc, char** argv) {
  srand(514);
  scanf("%d%d", &n, &m);
  for (int i = 0, u, v; i < m; i++) {
    scanf("%d%d", &u, &v);
    fail[make_pair(u, v)] = fail[make_pair(v, u)] = 1;
  }
  for (int i = 0; i < n; i++) per[i] = i + 1;
  if (m > (long long)n * (n - 1) / 2 - m) {
    puts("-1");
    exit(0);
  }
  int sign = 1;
  for (int T = 0, ed = min(5000, max((int)(1e6 / n), 300)); T < ed; T++) {
    random_shuffle(per, per + n);
    per[n] = per[0];
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (!fail.count(make_pair(per[i], per[i + 1]))) cnt++;
    }
    if (cnt >= m) {
      sign = 0;
      for (int i = 0; i < n && m > 0; i++) {
        if (!fail.count(make_pair(per[i], per[i + 1]))) {
          printf("%d %d\n", per[i], per[i + 1]);
          m--;
        }
      }
      break;
    }
  }
  if (sign) puts("-1");
  return 0;
}
