Problem: Vasya had an array of n integers, each element of the array was from 1 to n. He chose m pairs of different positions and wrote them down to a sheet of paper. Then Vasya compared the elements at these positions, and wrote down the results of the comparisons to another sheet of paper. For each pair he wrote either "greater", "less", or "equal".

After several years, he has found the first sheet of paper, but he couldn't find the second one. Also he doesn't remember the array he had. In particular, he doesn't remember if the array had equal elements. He has told this sad story to his informatics teacher Dr Helen.

She told him that it could be the case that even if Vasya finds his second sheet, he would still not be able to find out whether the array had two equal elements. 

Now Vasya wants to find two arrays of integers, each of length n. All elements of the first array must be distinct, and there must be two equal elements in the second array. For each pair of positions Vasya wrote at the first sheet of paper, the result of the comparison must be the same for the corresponding elements of the first array, and the corresponding elements of the second array. 

Help Vasya find two such arrays of length n, or find out that there are no such arrays for his sets of pairs.

Input

The first line of input contains two integers n, m — the number of elements in the array and number of comparisons made by Vasya (1 ≤ n ≤ 100 000, 0 ≤ m ≤ 100 000).

Each of the following m lines contains two integers a_i, b_i — the positions of the i-th comparison (1 ≤ a_i, b_i ≤ n; a_i ≠ b_i). It's guaranteed that any unordered pair is given in the input at most once.

Output

The first line of output must contain "YES" if there exist two arrays, such that the results of comparisons would be the same, and all numbers in the first one are distinct, and the second one contains two equal numbers. Otherwise it must contain "NO".

If the arrays exist, the second line must contain the array of distinct integers, the third line must contain the array, that contains at least one pair of equal elements. Elements of the arrays must be integers from 1 to n.

Examples

Input


1 0


Output


NO


Input


3 1
1 2


Output


YES
1 3 2 
1 3 1 


Input


4 3
1 2
1 3
2 4


Output


YES
1 3 4 2 
1 3 4 1 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class Solution{
	InputStream is;
	static PrintWriter out;
	String INPUT = "";
	static long mod = (long)1e9+7L;
	
	public void solve(){
		int n = ni(), m = ni();
		int[][] inp = new int[m][2];
		ArrayList<Integer>[] adj = new ArrayList[n+1];
		for(int i = 0; i <= n; i++){
			adj[i] = new ArrayList<Integer>();
		}
		if(n == 1){
			out.println("NO");
			return;
		}
		if(n == 2 && m > 0){
			out.println("NO");
			return;
		}
		
		for(int i = 0; i < m; i++){
			int x = ni(), y = ni();
			inp[i][0] = x; inp[i][1] = y;
			adj[x].add(y);
			adj[y].add(x);
		}

		for(int i = 1; i <= n; i++){
			if(adj[i].size() == n-1)continue;

			TreeSet<Integer> set = new TreeSet<Integer>();
			for(int j = 1; j <= n; j++){
				if(i == j) continue;
				set.add(j);
			}

			for(int elem : adj[i]){
				set.remove(elem);
			}

			int x = i, y = set.first();
//out.println(x+" "+y);
			int[] b = new int[n+1];
			for(int j = 1; j <= n; j++)b[j] = j;	
			b[y] = x;

			DirectedGraph g = new DirectedGraph(n);
			for(int j = 0; j < m; j++){
				if(b[inp[j][0]] > b[inp[j][1]]){
					//out.println((inp[j][1]-1) +" "+ (inp[j][0]-1));
					g.addEdge(inp[j][1]-1, inp[j][0]-1);
				}
				else{
					//out.println((inp[j][0]-1) +" "+ (inp[j][1]-1));
					g.addEdge(inp[j][0]-1, inp[j][1]-1);
				}
			}

			if(g.checkCycle()){
				out.println("NO");
				return;
			}

			ArrayList<Integer> top = g.topologicalSort();
//out.println(top);
			int[] a = new int[n+1];
			int ct = 1;
			for(int j = top.size()-1; j >= 0; j--){
				int elem = top.get(j);
				a[elem+1] = ct;
				ct += 1; 
			}

			out.println("YES");
			for(int j = 1; j <= n; j++){
				out.print(a[j] +" ");
			}
			out.println();
			for(int j = 1; j <= n; j++){
				out.print(b[j] +" ");
			}
			out.println();
			return;
		}

		out.println("NO");
	}
	
	static class Edge{
        int fs;
        long w;
        public Edge(int x, long y){
            fs = x;
            w = y;
        }
    }
    static class DirectedGraph{//made for 0 indexed graph.
        int V;
        ArrayList<Edge> adj[];
        public DirectedGraph(int v){
            V=v;
            adj=new ArrayList[v];
            for(int i=0;i<V;i++)adj[i]=new ArrayList<Edge>();
        }
        void addEdge(int v1,int v2){
            adj[v1].add(new Edge(v2,0));
        }
        void addEdge(int v1,int v2,long w){
            adj[v1].add(new Edge(v2,w));   
        }

        ArrayList<Integer> topSort;
        boolean vis[];
        void topologicalSortUtil(int i){
            vis[i]=true;
            for(Edge p : adj[i]){
                if(vis[i(p.fs)]==false){
                    topologicalSortUtil(i(p.fs));
                }
            }
            topSort.add(i);
        }
        ArrayList<Integer> topologicalSort(){
            topSort=new ArrayList<Integer>();
            vis=new boolean[V];
            for(int i=0;i<V;i++){//if graph is 1 indexed then change value of i=0 to i=1;
                if(vis[i]==false)
                    topologicalSortUtil(i);
            }
            return topSort;
        }

        boolean recStack[];
        boolean checkCycle(){
            vis = new boolean[V];
            recStack = new boolean[V];
            for(int i=0; i<V; i++){
                if(!vis[i] && containsCycle(i)){
                    return true;
                }
            }
            return false;
        }
        boolean containsCycle(int root){
            vis[root] = true;
            recStack[root] = true;

            for(Edge child : adj[root]){
                if(recStack[i(child.fs)]){
                    return true;
                }

                if( !vis[i(child.fs)] && containsCycle(i(child.fs)) ) {
                    return true;
                }
            }
            recStack[root] = false;

            return false;
        }
    }
	void run(){
		is = new DataInputStream(System.in);
		out = new PrintWriter(System.out);
		int t=1;while(t-->0)solve();
		out.flush();
	}
	public static void main(String[] args)throws Exception{new Solution().run();}
	long mod(long v, long m){if(v<0){long q=(Math.abs(v)+m-1L)/m;v=v+q*m;}return v%m;}
    long mod(long v){if(v<0){long q=(Math.abs(v)+mod-1L)/mod;v=v+q*mod;}return v%mod;}
	//Fast I/O code is copied from uwi code.
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	private int readByte(){
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	private String ns(){
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	private char[] ns(int n){
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	private char[][] nm(int n, int m){
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	private int[] na(int n){
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	private int ni(){
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	private long nl(){
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	static  int i(long x){return (int)Math.round(x);}
	static class Pair implements Comparable<Pair>{
		long fs,sc;
		Pair(long a,long b){
			fs=a;sc=b;
		}
		public int compareTo(Pair p){
			if(this.fs>p.fs)return 1;
			else if(this.fs<p.fs)return -1;
			else{
				return i(this.sc-p.sc);
			}
			//return i(this.sc-p.sc);
		}
		public String toString(){
			return "("+fs+","+sc+")";
		}	
	}
	
}