You are given a connected undirected graph consisting of n vertices and m edges. There are no self-loops or multiple edges in the given graph.

You have to direct its edges in such a way that the obtained directed graph does not contain any paths of length two or greater (where the length of path is denoted as the number of traversed edges).

Input

The first line contains two integer numbers n and m (2 ≤ n ≤ 2 ⋅ 10^5, n - 1 ≤ m ≤ 2 ⋅ 10^5) — the number of vertices and edges, respectively.

The following m lines contain edges: edge i is given as a pair of vertices u_i, v_i (1 ≤ u_i, v_i ≤ n, u_i ≠ v_i). There are no multiple edges in the given graph, i. e. for each pair (u_i, v_i) there are no other pairs (u_i, v_i) and (v_i, u_i) in the list of edges. It is also guaranteed that the given graph is connected (there is a path between any pair of vertex in the given graph).

Output

If it is impossible to direct edges of the given graph in such a way that the obtained directed graph does not contain paths of length at least two, print "NO" in the first line.

Otherwise print "YES" in the first line, and then print any suitable orientation of edges: a binary string (the string consisting only of '0' and '1') of length m. The i-th element of this string should be '0' if the i-th edge of the graph should be directed from u_i to v_i, and '1' otherwise. Edges are numbered in the order they are given in the input.

Example

Input


6 5
1 5
2 1
1 4
3 1
6 1


Output


YES
10100

Note

The picture corresponding to the first example: <image>

And one of possible answers: <image>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.lang.management.MemoryType;
import java.math.BigInteger;
import java.util.*;


public class Main {

static ArrayList<Integer>[]graph;
static boolean []vi;
static int[]co;
static boolean bibar(int node,int c){
    co[node]=c;
    for (int child:graph[node]) {
        if (co[child]==-1){
            bibar(child,c^1);
        }
        else if (co[child]==co[node]){
            return false;
        }
    }
    return true;

}

        public static void main (String[]args) throws IOException {
            Scanner in = new Scanner(System.in);
            try (PrintWriter or = new PrintWriter(System.out)) {

                    int n = in.nextInt(),m= in.nextInt();
                    graph= new ArrayList[n];
                for (int i = 0; i < n; i++) graph[i]= new ArrayList<>();
                ArrayList<Triple> p= new ArrayList<>();
                for (int i = 0; i < m; i++) {
                    int x=in.nextInt()-1,y=in.nextInt()-1;
                    graph[x].add(y);
                    graph[y].add(x);
                    p.add(new Triple(x,y));
                }
                co= new int[n];
                Arrays.fill(co,-1);
                boolean f= bibar(0,0);
                if (!f)or.println("NO");
                else {
                    or.println("YES");
                    for (int i = 0; i < m; i++) {
                        or.print(co[p.get(i).f]<co[p.get(i).t]?1:0);
                    }

                }




            }
        }
    static class SegmentTree {        // 1-based DS, OOP

        int N;            //the number of elements in the array as a power of 2 (i.e. after padding)
        int[] array, sTree, lazy;


        SegmentTree(int[] in) {
            array = in;
            N = in.length - 1;
            sTree = new int[N << 1];        //no. of nodes = 2*N - 1, we add one to cross out index zero
            lazy = new int[N << 1];
            build(1, 1, N);
        }


        void build(int node, int b, int e)    // O(n)
        {
            if (b == e)
                sTree[node] = array[b];
            else {
                int mid = (b + e) >> 1;
                build(node << 1, b, mid);
                build(node << 1 | 1, mid + 1, e);
                sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
            }
        }


        void update_point(int index, int val)            // O(log n)
        {
            index += N - 1;
            sTree[index] += val;
            while (index > 1) {
                index >>= 1;
                sTree[index] = sTree[index << 1] + sTree[index << 1 | 1];
            }
        }


        void update_range(int i, int j, int val)        // O(log n)
        {
            update_range(1, 1, N, i, j, val);
        }


        void update_range(int node, int b, int e, int i, int j, int val) {
            if (i > e || j < b)
                return;
            if (b >= i && e <= j) {
                sTree[node] += (e - b + 1) * val;
                lazy[node] += val;
            } else {
                int mid = b + e >> 1;
                propagate(node, b, mid, e);
                update_range(node << 1, b, mid, i, j, val);
                update_range(node << 1 | 1, mid + 1, e, i, j, val);
                sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
            }

        }

        void propagate(int node, int b, int mid, int e) {
            lazy[node << 1] += lazy[node];
            lazy[node << 1 | 1] += lazy[node];
            sTree[node << 1] += (mid - b + 1) * lazy[node];
            sTree[node << 1 | 1] += (e - mid) * lazy[node];
            lazy[node] = 0;
        }

        int query(int i, int j) {
            return query(1, 1, N, i, j);
        }


        int query(int node, int b, int e, int i, int j)    // O(log n)
        {
            if (i > e || j < b)
                return 0;
            if (b >= i && e <= j)
                return sTree[node];
            int mid = (b + e) >> 1;
            propagate(node, b, mid, e);
            int q1 = query(node << 1, b, mid, i, j);
            int q2 = query(node << 1 | 1, mid + 1, e, i, j);
            return q1 + q2;

        }


    }












    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}
class  Triple{
   int f,t;

    public Triple(int f, int t) {
        this.f = f;
        this.t = t;
    }
}
