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;
    SimpleGraph ori;
    SimpleGraph g;
    
    void swap(int[] d, int i, int j) {
        final int v = d[i];
        d[i] = d[j];
        d[j] = v;
    }
    
    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];
        ori = new SimpleGraph(V);
        g = new SimpleGraph(V);
        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;
            }
        }

        if(V <= 4) {
            int[] deg = new int[V];
            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;
        }
        
        for(int[] e : es) {
            ori.add(e[0], e[1]);
            ori.add(e[1], e[0]);
        }

        int len = 0;
        int[] set = new int[V];
        for(int i = 0; i < V; i++) {
            set[len++] = i;
        }
        swap(set, 0, --len);
        
        Random random = new Random(0);
        int rest = E;
        for(int p = 0; rest > 0; rest--) {
            while(true) {
                int ji, j;
                
                if(len == 0) {
                    ji = random.nextInt(V - len);
                    j = set[ji + len];
                }
                else {
                    ji = random.nextInt(len);
                    j = set[ji];
                }
                
                if(p == j) continue;
                
                if(g.deg(j) < 2 && !ori.connected(p, j)) {
                    g.add(p, j);
                    g.add(j, p);
                    if(len != 0) swap(set, ji, --len);
                    p = j;
                    break;
                }

                final int ki = random.nextInt(V - len);
                final int k = set[len + ki];
                if(p != k) {
                    boolean bad = false;
                    for(final int t : g.to[p]) {
                        if(ori.connected(k, t)) {
                            bad = true;
                        }
                    }
                    for(final int t : g.to[k]) {
                        if(ori.connected(p, t)) {
                            bad = true;
                        }
                    }
                    if(!bad) {
                        g.swap(p, k);
                        p = k;
                    }
                }
            }
        }
        
        for(int i = 0; i < V; i++)
            for(int j : g.to[i])
                if(i < j)
                    io.out.println((i+1) + " " + (j+1));
    }
    
    static
    public class SimpleGraph {
        int V;
        
        List<Integer>[] to;
        
        public SimpleGraph(int V) {
            this.V = V;
            to = new List[V];
            
            for(int i = 0; i < V; i++) {
                to[i] = new ArrayList<Integer>();
            }
        }
        
        int deg(int v) { return to[v].size(); }
        
        void add(int s, int t) {
            to[s].add(t);
        }
        
        boolean connected(int s, int t) {
            return to[s].contains(t);
        }
        
        boolean remove(int s, int t) {
            return to[s].remove(Integer.valueOf(t));
        }
        
        void replace(int v, int s, int t) {
            if(remove(v, s)) {
                add(v, t);
            }
        }
        
        void swap(int s, int t) {
            for(int v : to[s]) if(v != s) replace(v, s, t);
            for(int v : to[t]) if(v != t) replace(v, t, s);
            
            final List<Integer> tmp = to[s];
            to[s] = to[t];
            to[t] = tmp;

            replace(t, t, s);
            replace(s, s, t);
        }
    }

    
    
    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());
        }

    }

}