Problem: I have an undirected graph consisting of n nodes, numbered 1 through n. Each node has at most two incident edges. For each pair of nodes, there is at most an edge connecting them. No edge connects a node to itself.

I would like to create a new graph in such a way that: 

  * The new graph consists of the same number of nodes and edges as the old graph. 
  * The properties in the first paragraph still hold. 
  * For each two nodes u and v, if there is an edge connecting them in the old graph, there is no edge connecting them in the new graph. 



Help me construct the new graph, or tell me if it is impossible.

Input

The first line consists of two space-separated integers: n and m (1 ≤ m ≤ n ≤ 105), denoting the number of nodes and edges, respectively. Then m lines follow. Each of the m lines consists of two space-separated integers u and v (1 ≤ u, v ≤ n; u ≠ v), denoting an edge between nodes u and v.

Output

If it is not possible to construct a new graph with the mentioned properties, output a single line consisting of -1. Otherwise, output exactly m lines. Each line should contain a description of edge in the same way as used in the input format.

Examples

Input

8 7
1 2
2 3
4 5
5 6
6 8
8 7
7 4


Output

1 4
4 6
1 6
2 7
7 5
8 5
2 8


Input

3 2
1 2
2 3


Output

-1


Input

5 4
1 2
2 3
3 4
4 1


Output

1 3
3 5
5 2
2 4

Note

The old graph of the first example:

<image>

A possible new graph for the first example:

<image>

In the second example, we cannot create any new graph.

The old graph of the third example:

<image>

A possible new graph for the third example:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct pt {
  int l, r;
};
struct chain {
  pt l, r;
};
struct cycle {
  pt l, m, r;
};
int nxt[100007];
int vi[100007];
vector<int> g[100007];
vector<int> recur;
vector<int> seq;
vector<pt> pts;
vector<chain> chains;
vector<chain> chains2;
vector<cycle> cycles;
vector<cycle> cycles2;
int isChain(int v, int p = -1) {
  vi[v] = 1;
  if (g[v].size() == 0) return -1;
  if (g[v].size() == 1) return v;
  if (((int)(recur).size()) && v == recur[0]) return 0;
  recur.push_back(v);
  if (g[v][0] == p) {
    return isChain(g[v][1], v);
  }
  return isChain(g[v][0], v);
}
void markCycle(int v, int p = -1) {
  vi[v] = 1;
  if (((int)(recur).size()) && v == recur[0]) return;
  recur.push_back(v);
  if (g[v][0] == p) {
    markCycle(g[v][1], v);
    return;
  }
  markCycle(g[v][0], v);
}
void markChain(int v, int p = -1) {
  vi[v] = 1;
  recur.push_back(v);
  if (((int)(recur).size()) > 1 && ((int)(g[v]).size()) == 1) {
    return;
  }
  if (p != -1 && g[v][0] == p) {
    markChain(g[v][1], v);
    return;
  }
  markChain(g[v][0], v);
}
int t;
int main() {
  int n, m, a, b;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    if (!vi[i]) {
      recur.clear();
      int c = isChain(i);
      recur.clear();
      if (c == -1) {
        pts.push_back({i, i});
      } else if (c == 0) {
        markCycle(i);
        if (((int)(recur).size()) == 3) {
          pt l = {recur[0], recur[0]};
          pt m = {recur[1], recur[1]};
          pt r = {recur[2], recur[2]};
          cycles.push_back({l, m, r});
        } else if (((int)(recur).size()) == 4) {
          nxt[recur[0]] = recur[2];
          nxt[recur[1]] = recur[3];
          pt l = {recur[0], recur[2]};
          pt m = {recur[1], recur[1]};
          pt r = {recur[3], recur[3]};
          cycles.push_back({l, m, r});
        } else {
          if (((int)(recur).size()) % 2 == 0) {
            seq.clear();
            for (int j = 0; j < ((int)(recur).size()); j += 2)
              seq.push_back(recur[j]);
            for (int j = 0; j < ((int)(seq).size()); j++)
              nxt[seq[j]] = seq[(j + 1) % ((int)(seq).size())];
            pt l = {seq[0], seq[((int)(seq).size()) - 3]};
            pt m = {seq[((int)(seq).size()) - 2], seq[((int)(seq).size()) - 2]};
            pt r = {seq[((int)(seq).size()) - 1], seq[((int)(seq).size()) - 1]};
            cycles2.push_back({l, m, r});
            seq.clear();
            for (int j = 1; j < ((int)(recur).size()); j += 2)
              seq.push_back(recur[j]);
            for (int j = 0; j < ((int)(seq).size()); j++)
              nxt[seq[j]] = seq[(j + 1) % ((int)(seq).size())];
            l = {seq[0], seq[((int)(seq).size()) - 3]};
            m = {seq[((int)(seq).size()) - 2], seq[((int)(seq).size()) - 2]};
            r = {seq[((int)(seq).size()) - 1], seq[((int)(seq).size()) - 1]};
            cycles2.push_back({l, m, r});
          } else {
            int qtdj = 0;
            seq.clear();
            for (int j = 0; j || !qtdj; j = (j + 2) % ((int)(recur).size())) {
              if (j == 0) qtdj++;
              seq.push_back(recur[j]);
            }
            for (int j = 0; j < ((int)(seq).size()); j++)
              nxt[seq[j]] = seq[(j + 1) % ((int)(seq).size())];
            pt l = {seq[0], seq[((int)(seq).size()) - 3]};
            pt m = {seq[((int)(seq).size()) - 2], seq[((int)(seq).size()) - 2]};
            pt r = {seq[((int)(seq).size()) - 1], seq[((int)(seq).size()) - 1]};
            cycles2.push_back({l, m, r});
          }
        }
      } else {
        markChain(c);
        if (((int)(recur).size()) == 2) {
          pt l = {recur[0], recur[0]};
          pt r = {recur[1], recur[1]};
          chains.push_back({l, r});
        } else if (((int)(recur).size()) == 3) {
          nxt[recur[0]] = recur[2];
          pt l = {recur[0], recur[2]};
          pt r = {recur[1], recur[1]};
          chains.push_back({l, r});
        } else {
          seq.clear();
          for (i = (((int)(recur).size()) - 1) / 2; i >= 0; i--)
            seq.push_back(recur[i * 2]);
          for (i = ((int)(recur).size()) / 2; i >= 1; i--)
            seq.push_back(recur[i * 2 - 1]);
          for (int j = 0; j < ((int)(seq).size()) - 1; j++)
            nxt[seq[j]] = seq[j + 1];
          pt l = {seq[0], seq[((int)(seq).size()) - 2]};
          pt r = {seq[((int)(seq).size()) - 1], seq[((int)(seq).size()) - 1]};
          chains2.push_back({l, r});
        }
      }
    }
  }
  int ok = 1;
  while (!chains.empty()) {
    chain c = chains.back();
    chains.pop_back();
    if (!chains.empty() || !chains2.empty()) {
      chain c2;
      if (!chains.empty()) {
        c2 = chains.back();
        chains.pop_back();
      } else {
        c2 = chains2.back();
        chains2.pop_back();
      }
      swap(c.r, c2.r);
      nxt[c.l.r] = c.r.l;
      nxt[c2.l.r] = c2.r.l;
      chains2.push_back(c);
      chains2.push_back(c2);
      continue;
    }
    if (!cycles.empty() || !cycles2.empty()) {
      cycle c2;
      if (!cycles.empty()) {
        c2 = cycles.back();
        cycles.pop_back();
      } else {
        c2 = cycles2.back();
        cycles2.pop_back();
      }
      nxt[c2.l.r] = c.l.l;
      nxt[c.l.r] = c2.m.l;
      nxt[c2.m.r] = c.r.l;
      nxt[c.r.r] = c2.r.l;
      c.l.l = c2.l.l;
      c.l.r = c.r.r;
      c.r = c2.r;
      chains2.push_back(c);
      continue;
    }
    if (!pts.empty()) {
      pt p = pts.back();
      pts.pop_back();
      c.r = p;
      nxt[c.l.r] = p.l;
      chains2.push_back(c);
      continue;
    }
    printf("-1\n");
    return 0;
  }
  while (!cycles.empty()) {
    cycle c = cycles.back();
    cycles.pop_back();
    if (!cycles.empty() || !cycles2.empty()) {
      cycle c2;
      if (!cycles.empty()) {
        c2 = cycles.back();
        cycles.pop_back();
      } else {
        c2 = cycles2.back();
        cycles2.pop_back();
      }
      nxt[c.l.r] = c2.l.l;
      nxt[c2.l.r] = c.m.l;
      nxt[c.m.r] = c2.m.l;
      nxt[c2.m.r] = c.r.l;
      nxt[c.r.r] = c2.r.l;
      nxt[c2.r.r] = c.l.l;
      c.l.r = c2.l.r;
      c.m.r = c2.m.r;
      c.r.r = c2.r.r;
      cycles2.push_back(c);
      continue;
    }
    if (!chains.empty() || !chains2.empty()) {
      chain c2;
      if (!chains.empty()) {
        c2 = chains.back();
        chains.pop_back();
      } else {
        c2 = chains2.back();
        chains2.pop_back();
      }
      nxt[c.l.r] = c2.l.l;
      nxt[c2.l.r] = c.m.l;
      nxt[c.m.r] = c2.r.l;
      nxt[c2.r.r] = c.r.l;
      c2.l.l = c.l.l;
      c2.l.r = c2.r.r;
      c2.r = c.r;
      chains2.push_back(c2);
      continue;
    }
    if (!pts.empty() && c.l.l != c.l.r) {
      pt p = pts.back();
      pts.pop_back();
      nxt[c.l.r] = p.l;
      nxt[p.r] = c.m.l;
      nxt[c.m.r] = c.r.l;
      chain c2;
      c2.l.l = c.l.l;
      c2.l.r = c.m.r;
      c2.r = c.r;
      chains2.push_back(c2);
      continue;
    }
    if (((int)(pts).size()) >= 2) {
      pt p1 = pts.back();
      pts.pop_back();
      pt p2 = pts.back();
      pts.pop_back();
      c.m = p1;
      c.r = p2;
      nxt[c.l.r] = c.m.l;
      nxt[c.m.r] = c.r.l;
      nxt[c.r.r] = c.l.l;
      cycles2.push_back(c);
      continue;
    }
    printf("-1\n");
    return 0;
  }
  for (chain c : chains2) {
    int i = c.l.l;
    int j = c.r.r;
    while (i != j) {
      printf("%d %d\n", i, nxt[i]);
      i = nxt[i];
    }
  }
  for (cycle c : cycles2) {
    int i = c.l.l;
    int j = c.l.l;
    while (1) {
      printf("%d %d\n", i, nxt[i]);
      i = nxt[i];
      if (i == j) break;
    }
  }
  return 0;
}