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;
vector<vector<int> > cycleAns, chainAns, ans;
vector<vector<int> > specialCycle[6], specialChain[7];
vector<int> V, G[100005];
bool cycle;
bool chk[100005];
void dfs(int x, int p) {
  V.push_back(x);
  chk[x] = true;
  for (int i = 0; i < G[x].size(); i++) {
    int adj = G[x][i];
    if (adj == p) continue;
    if (chk[adj]) {
      cycle = true;
      continue;
    }
    dfs(adj, x);
  }
}
void print() {
  int nn = ans.size();
  for (int i = 0; i < nn; i++) {
    vector<int> tmp = ans[i];
    int szz = tmp.size();
    for (int j = 0; j < szz - 1; j++) {
      cout << tmp[j] << " " << tmp[j + 1] << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int node, edge;
  cin >> node >> edge;
  for (int i = 0; i < edge; i++) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= node; i++) {
    if (!chk[i]) {
      V.clear();
      cycle = false;
      dfs(i, -1);
      if (cycle) {
        int sz = V.size();
        if (sz <= 4)
          specialCycle[sz].push_back(V);
        else {
          vector<int> tmp1, tmp2;
          if (sz & 1) {
            for (int j = 0; j < sz; j += 2) tmp1.push_back(V[j]);
            for (int j = 1; j < sz; j += 2) tmp1.push_back(V[j]);
            tmp1.push_back(tmp1[0]);
            cycleAns.push_back(tmp1);
          } else {
            for (int j = 0; j < sz; j += 2) tmp1.push_back(V[j]);
            tmp1.push_back(V[1]);
            tmp1.push_back(V[sz - 1]);
            for (int j = 3; j < sz - 1; j += 2) tmp1.push_back(V[j]);
            tmp1.push_back(tmp1[0]);
            cycleAns.push_back(tmp1);
          }
        }
      } else {
        int sz = V.size(), start;
        for (int k = 0; k < sz; k++) {
          chk[V[k]] = false;
          if (G[V[k]].size() <= 1) start = V[k];
        }
        V.clear();
        dfs(start, -1);
        if (sz <= 3)
          specialChain[sz].push_back(V);
        else {
          vector<int> tmp1, tmp2;
          for (int j = 0; j < sz; j += 2) tmp1.push_back(V[j]);
          for (int j = 1; j < sz; j += 2) tmp2.push_back(V[j]);
          reverse(tmp1.begin(), tmp1.end());
          int szz = tmp2.size();
          for (int j = szz - 1; j >= 0; j--) tmp1.push_back(tmp2[j]);
          chainAns.push_back(tmp1);
        }
      }
    }
  }
  bool say2 = false, say3 = false;
  bool sss3 = false, sss4 = false;
  int chainSZ1 = specialChain[1].size();
  int chainSZ2 = specialChain[2].size();
  if (chainSZ2 & 1) say2 = true;
  int chainSZ3 = specialChain[3].size();
  if (chainSZ3 & 1) say3 = true;
  int cycleSZ3 = specialCycle[3].size();
  if (cycleSZ3 == 1) sss3 = true;
  int cycleSZ4 = specialCycle[4].size();
  if (cycleSZ4 == 1) sss4 = true;
  while (chainSZ2 > 1) {
    swap(specialChain[2][chainSZ2 - 1][0], specialChain[2][chainSZ2 - 2][0]);
    chainAns.push_back(specialChain[2][chainSZ2 - 1]);
    chainAns.push_back(specialChain[2][chainSZ2 - 2]);
    chainSZ2 -= 2;
    specialChain[2].pop_back();
    specialChain[2].pop_back();
  }
  while (chainSZ3 > 1) {
    swap(specialChain[3][chainSZ3 - 1][1], specialChain[3][chainSZ3 - 2][1]);
    chainAns.push_back(specialChain[3][chainSZ3 - 1]);
    chainAns.push_back(specialChain[3][chainSZ3 - 2]);
    chainSZ3 -= 2;
    specialChain[3].pop_back();
    specialChain[3].pop_back();
  }
  if (say2 && say3) {
    swap(specialChain[2][0][0], specialChain[3][0][1]);
    chainAns.push_back(specialChain[2][0]);
    chainAns.push_back(specialChain[3][0]);
    specialChain[2][0].pop_back();
    specialChain[3][0].pop_back();
    say2 = false;
    say3 = false;
  }
  if (sss3 == false && cycleSZ3) {
    vector<int> tmp;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < cycleSZ3; j++) {
        tmp.push_back(specialCycle[3][j][i]);
      }
    }
    tmp.push_back(tmp[0]);
    ans.push_back(tmp);
  }
  if (sss4 == false && cycleSZ4) {
    vector<int> tmp;
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < cycleSZ4; j++) {
        tmp.push_back(specialCycle[4][j][i]);
      }
    }
    tmp.push_back(tmp[0]);
    ans.push_back(tmp);
  }
  if (sss3 && sss4) {
    vector<int> tmp1 = specialCycle[3][0];
    vector<int> tmp2 = specialCycle[4][0];
    vector<int> tmp;
    tmp.push_back(tmp1[0]);
    tmp.push_back(tmp2[0]);
    tmp.push_back(tmp2[2]);
    tmp.push_back(tmp1[1]);
    tmp.push_back(tmp2[1]);
    tmp.push_back(tmp1[2]);
    tmp.push_back(tmp2[3]);
    tmp.push_back(tmp[0]);
    cycleAns.push_back(tmp);
    sss3 = false;
    sss4 = false;
  }
  if (sss3) {
    if (say2) {
      vector<int> tmp1 = specialCycle[3][0];
      vector<int> tmp2 = specialChain[2][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(tmp2[0]);
      tmp.push_back(tmp1[1]);
      tmp.push_back(tmp2[1]);
      tmp.push_back(tmp1[2]);
      chainAns.push_back(tmp);
      sss3 = false;
      say2 = false;
    } else if (say3) {
      vector<int> tmp1 = specialCycle[3][0];
      vector<int> tmp2 = specialChain[3][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(tmp2[0]);
      tmp.push_back(tmp1[1]);
      tmp.push_back(tmp2[1]);
      tmp.push_back(tmp1[2]);
      tmp.push_back(tmp2[2]);
      chainAns.push_back(tmp);
      sss3 = false;
      say3 = false;
    }
  }
  if (sss4) {
    if (say2) {
      vector<int> tmp1 = specialCycle[4][0];
      vector<int> tmp2 = specialChain[2][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(tmp1[2]);
      tmp.push_back(tmp2[0]);
      tmp.push_back(tmp1[1]);
      tmp.push_back(tmp2[1]);
      tmp.push_back(tmp1[3]);
      chainAns.push_back(tmp);
      sss4 = false;
      say2 = false;
    } else if (say3) {
      vector<int> tmp1 = specialCycle[4][0];
      vector<int> tmp2 = specialChain[3][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(tmp1[2]);
      tmp.push_back(tmp2[0]);
      tmp.push_back(tmp1[1]);
      tmp.push_back(tmp2[1]);
      tmp.push_back(tmp1[3]);
      tmp.push_back(tmp2[2]);
      chainAns.push_back(tmp);
      sss4 = false;
      say3 = false;
    }
  }
  chainSZ1--;
  if (chainSZ1 >= 0) {
    if (say2 && chainSZ1 >= 0) {
      swap(specialChain[2][chainSZ2 - 1][0], specialChain[1][chainSZ1][0]);
      chainAns.push_back(specialChain[2][0]);
      say2 = false;
    } else if (say3 && chainSZ1 >= 0) {
      swap(specialChain[3][chainSZ3 - 1][1], specialChain[1][chainSZ1][0]);
      chainAns.push_back(specialChain[3][0]);
      say3 = false;
    } else if (sss3 && chainSZ1 >= 1) {
      int a = specialChain[1][0][0];
      int b = specialChain[1][1][0];
      vector<int> tmp1 = specialCycle[3][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(a);
      tmp.push_back(b);
      tmp.push_back(tmp1[1]);
      sss3 = false;
      chainAns.push_back(tmp);
    } else if (sss4) {
      vector<int> tmp1 = specialCycle[4][0];
      vector<int> tmp;
      tmp.push_back(tmp1[0]);
      tmp.push_back(tmp1[2]);
      tmp.push_back(specialChain[1][0][0]);
      tmp.push_back(tmp1[1]);
      tmp.push_back(tmp1[3]);
      sss4 = false;
      chainAns.push_back(tmp);
    }
  }
  int cycleAnsSize = cycleAns.size();
  int chainAnsSize = chainAns.size();
  if (say2) {
    if (cycleAnsSize > 0) {
      swap(specialChain[2][0][0], cycleAns[cycleAnsSize - 1][1]);
      chainAns.push_back(specialChain[2][0]);
      say2 = false;
    } else if (chainAnsSize > 0) {
      swap(specialChain[2][0][0], chainAns[chainAnsSize - 1][0]);
      chainAns.push_back(specialChain[2][0]);
      say2 = false;
    }
  }
  if (say3) {
    if (cycleAnsSize > 0) {
      swap(specialChain[3][0][1], cycleAns[cycleAnsSize - 1][1]);
      chainAns.push_back(specialChain[3][0]);
      say3 = false;
    } else if (chainAnsSize > 0) {
      swap(specialChain[3][0][1], chainAns[chainAnsSize - 1][0]);
      chainAns.push_back(specialChain[3][0]);
      say3 = false;
    }
  }
  if (sss3) {
    if (cycleAnsSize > 0) {
      vector<int> tmp1 = cycleAns[cycleAnsSize - 1];
      cycleAns.pop_back();
      vector<int> tmp2 = specialCycle[3][0];
      int szzz = tmp1.size();
      vector<int> tmp;
      for (int i = 0; i < szzz; i++) {
        tmp.push_back(tmp1[i]);
        if (i < 3) tmp.push_back(tmp2[i]);
      }
      cycleAns.push_back(tmp);
      sss3 = false;
    } else if (chainAnsSize > 0) {
      vector<int> tmp1 = chainAns[chainAnsSize - 1];
      chainAns.pop_back();
      vector<int> tmp2 = specialCycle[3][0];
      int szzz = tmp1.size();
      vector<int> tmp;
      for (int i = 0; i < szzz; i++) {
        if (i < 3) tmp.push_back(tmp2[i]);
        tmp.push_back(tmp1[i]);
      }
      if (szzz < 3) tmp.push_back(tmp2[2]);
      chainAns.push_back(tmp);
      sss3 = false;
    }
  }
  if (sss4) {
    if (cycleAnsSize > 0) {
      vector<int> tmp1 = cycleAns[cycleAnsSize - 1];
      cycleAns.pop_back();
      vector<int> tmp2 = specialCycle[4][0];
      int szzz = tmp1.size();
      vector<int> tmp;
      for (int i = 0; i < szzz; i++) {
        tmp.push_back(tmp1[i]);
        if (i == 0) {
          tmp.push_back(tmp2[0]);
          tmp.push_back(tmp2[2]);
        } else if (i == 1) {
          tmp.push_back(tmp2[1]);
          tmp.push_back(tmp2[3]);
        }
      }
      cycleAns.push_back(tmp);
      sss4 = false;
    } else if (chainAnsSize > 0) {
      vector<int> tmp1 = chainAns[chainAnsSize - 1];
      chainAns.pop_back();
      vector<int> tmp2 = specialCycle[4][0];
      int szzz = tmp1.size();
      vector<int> tmp;
      tmp.push_back(tmp2[0]);
      tmp.push_back(tmp2[2]);
      for (int i = 0; i < szzz; i++) {
        tmp.push_back(tmp1[i]);
        if (i == 0) {
          tmp.push_back(tmp2[1]);
          tmp.push_back(tmp2[3]);
        }
      }
      chainAns.push_back(tmp);
      sss4 = false;
    }
  }
  if (say2 || say3 || sss3 || sss4) {
    cout << -1 << endl;
    return 0;
  }
  int aaa = chainAns.size();
  for (int i = 0; i < aaa; i++) ans.push_back(chainAns[i]);
  aaa = cycleAns.size();
  for (int i = 0; i < aaa; i++) ans.push_back(cycleAns[i]);
  print();
  return 0;
}