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 JAVA):

Solution:

import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.util.Arrays.*;

public class C {
    private static final int mod = (int)1e9+7;

    IOFast io = new IOFast();
    
    int V, E;
    int[][] es;
    int[][] con;
    int[] deg;
    int[][] oriCon;
    int[] oriDeg;
    
    boolean isOriginal(int i, int j) {
        for(int k = 0; k < oriDeg[i]; k++) {
            if(oriCon[i][k] == j) {
                return true;
            }
        }
        return false;
    }
    
    boolean connected(int i, int j) {
        if(i == j || isOriginal(i, j)) return true;
        for(int k = 0; k < deg[i]; k++) {
            if(con[i][k] == j) {
                return true;
            }
        }
        return false;
    }
    
    void remove(int i, int j) {
        int u = 0;
        for(int k = 0; k < deg[i]; k++) {
            if(con[i][k] != j) {
                con[i][u++] = con[i][k];
            }
        }
        con[i][u] = -1;
        deg[i] = u;
    }
    
    void add(int i, int j) {
        if(!connected(i, j)) {
            con[i][deg[i]++] = j;
            con[j][deg[j]++] = i;
        }
    }
    
    boolean swap(int p, int k) {
        boolean adj = false;
        for(int a = 0; a < deg[k]; a++) {
            if(p == con[k][a]) adj = true;
            if(isOriginal(p, con[k][a])) {
                return false;
            }
        }
        for(int a = 0; a < deg[p]; a++) {
            if(isOriginal(k, con[p][a])) {
                return false;
            }
        }

        final int[] ck = Arrays.copyOf(con[k], deg[k]);
        final int[] cp = Arrays.copyOf(con[p], deg[p]);
        for(int kk : ck) {
            remove(k, kk);
            remove(kk, k);
        }
        for(int kk : cp) {
            remove(p, kk);
            remove(kk, p);
        }

        for(int kk : ck) { add(p, kk); }
        for(int kk : cp) { add(k, kk); }
        
        if(adj) {
            add(p, k);
            add(k, p);
        }
        
        return true;
    }
    
    boolean dfs(boolean[][] con, int[] deg, int rest, int idx) {
        if(rest == 0) {
            return true;
        }
        
        if(idx >= V) return false;
        for(int i = 0; i < idx; i++) {
            if(deg[i] < 2 && deg[idx] < 2 && !con[i][idx]) {
                con[i][idx] = con[idx][i] = true;
                deg[i]++;
                deg[idx]++;
                if(dfs(con, deg, rest - 1, idx)) {
                    io.out.println((i+1) + " " + (idx+1));
                    return true;
                }
                con[i][idx] = con[idx][i] = false;
                deg[i]--;
                deg[idx]--;
            }
        }
        
        return dfs(con, deg, rest, idx + 1);
    }
    
    public void run() throws IOException {
        V = io.nextInt();
        E = io.nextInt();
//      V = 100000;
//      E = 100000;
        es = new int[E][2];
        for(int i = 0; i < E; i++) {
            for(int j = 0; j < es[i].length; j++) {
                es[i][j] = io.nextInt() - 1;
//              es[i][j] = (i + j) % V;
            }
        }

        oriCon = new int[V][2];
        oriDeg = new int[V];
        con = new int[V][2];
        deg = new int[V];
        if(V <= 4) {
            boolean[][] con = new boolean[V][V];
            for(int i = 0; i < E; i++) {
                con[es[i][0]][es[i][1]] = true;
                con[es[i][1]][es[i][0]] = true;
            }
            if(!dfs(con, deg, E, 0)) {
                io.out.println(-1);
            }
            return;
        }
        
        int len = V;
        int ulen = 0;
        int[] set = new int[V];
        int[] setu = new int[V];
        for(int i = 0; i < V; i++) {
            set[i] = i;
        }
        for(int[] e : es) {
            oriCon[e[0]][oriDeg[e[0]]++] = e[1];
            oriCon[e[1]][oriDeg[e[1]]++] = e[0];
        }
        Random random = new Random(0);
        int rest = E;
        setu[ulen++] = 0;
        set[0] = set[--len];
        LOOP2: for(int p = 0; rest > 0; rest--) {
            if(rest == 1 && len == 0) {
                int q = -1;
                for(int i = 0; i < V; i++) {
                    if(i != p && deg[i] == 1) {
                        q = i;
                    }
                }
                
                while(true) {
                    if(!connected(p, q)) {
                        add(p, q);
                        break LOOP2;
                    }
                    
                    if(random.nextBoolean()) {
                        final int t = p;
                        p = q;
                        q = t;
                    }

                    final int ki = random.nextInt(ulen);
                    int k = setu[ki];
                    if(p != k) {
                        if(swap(p, k)) {
                            p = k;
                        }
                    }
                }
            }
            
            
            while(true) {
                final int ji = random.nextInt(len);
                int j = set[ji];
                if(deg[j] == 0 && p != j && !connected(p, j)) {
                    add(p, j);
                    set[ji] = set[--len];
                    setu[ulen++] = j;
                    /*
//                  System.err.println(p + " " + j);
                    System.err.println("test2");
                    //*
                    for(int ii = 0; ii < V; ii++)
                        for(int jj = 0; jj < deg[ii]; jj++)
//                          if(i < con[i][j])
                            System.err.println((ii+1) + " " + (con[ii][jj]+1));
                    //*/
                    p = j;
                    break;
                }

                final int ki = random.nextInt(ulen);
                int k = setu[ki];
                if(p != k) {
                    /*
                    System.err.println("test");
                    for(int ii = 0; ii < V; ii++)
                        for(int jj = 0; jj < deg[ii]; jj++)
//                              if(i < con[i][j])
                            System.err.println((ii+1) + " " + (con[ii][jj]+1));
                    //*/
                    if(swap(p, k)) {
//                      System.err.println("swap: " + p + " " + k);
                        p = k;
                    }
                }
            }
        }
        
        for(int i = 0; i < V; i++)
            for(int j = 0; j < deg[i]; j++)
                if(i < con[i][j])
                    io.out.println((i+1) + " " + (con[i][j]+1));
    }

    
    
    void main() throws IOException {
        //      IOFast.setFileIO("rle-size.in", "rle-size.out");
        try {
            run();
        }
        catch (EndOfFileRuntimeException e) { }
        io.out.flush();
    }

    public static void main(String[] args) throws IOException {
        new C().main();
    }
    
    static class EndOfFileRuntimeException extends RuntimeException {
        private static final long serialVersionUID = -8565341110209207657L; }

    static
    public class IOFast {
        private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        private PrintWriter out = new PrintWriter(System.out);

        void setFileIO(String ins, String outs) throws IOException {
            in = new BufferedReader(new FileReader(ins));
            out = new PrintWriter(new FileWriter(outs));
        }

        //      private static final int BUFFER_SIZE = 50 * 200000;
        private static int pos, readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static final char[] str = new char[500000*8*2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];

        static {
            for(int i = 0; i < 10; i++) { isDigit['0' + i] = true; }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }

        public int read() throws IOException {
            if(pos >= readLen) {
                pos = 0;
                readLen = in.read(buffer);
                if(readLen <= 0) { throw new EndOfFileRuntimeException(); }
            }
            return buffer[pos++];
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(nextString());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(nextString());
        }

        public char nextChar() throws IOException {
            while(true) {
                final int c = read();
                if(!isSpace[c]) { return (char)c; }
            }
        }
        
        int reads(char[] cs, int len, boolean[] accept) throws IOException {
            try {
                while(true) {
                    final int c = read();
                    if(accept[c]) { break; }
                    str[len++] = (char)c;
                }
            }
            catch(EndOfFileRuntimeException e) { ; }
            
            return len;
        }

        public char[] nextLine() throws IOException {
            int len = 0;
            str[len++] = nextChar();
            len = reads(str, len, isLineSep);
            
            try {
                if(str[len-1] == '\r') { len--; read(); }
            }
            catch(EndOfFileRuntimeException e) { ; }
            
            return Arrays.copyOf(str, len);
        }

        public String nextString() throws IOException {
            return new String(next());
        }

        public char[] next() throws IOException {
            int len = 0;
            str[len++] = nextChar();
            len = reads(str, len, isSpace);
            return Arrays.copyOf(str, len);
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(nextString());
        }

    }

}