Problem: The Trinitarian kingdom has exactly n = 3k cities. All of them are located on the shores of river Trissisipi, which flows through the whole kingdom. Some of the cities are located on one side of the river, and all the rest are on the other side.

Some cities are connected by bridges built between them. Each bridge connects two cities that are located on the opposite sides of the river. Between any two cities exists no more than one bridge.

The recently inaugurated King Tristan the Third is busy distributing his deputies among cities. In total there are k deputies and the king wants to commission each of them to control exactly three cities. However, no deputy can be entrusted to manage the cities, which are connected by a bridge — the deputy can set a too high fee for travelling over the bridge to benefit his pocket, which is bad for the reputation of the king.

Help King Tristan the Third distribute the deputies between the cities, if it is possible.

Input

The first line contains two integers n and m — the number of cities and bridges (3 ≤ n < 105, n = 3k, 0 ≤ m ≤ 105). Next m lines describe the bridges. The i-th line contains two integers ai and bi — the numbers of cities that are connected by the i-th bridge (1 ≤ ai, bi ≤ n, ai ≠ bi, 1 ≤ i ≤ m).

It is guaranteed that no bridge connects a city with itself and that any two cities are connected with no more than one bridge.

Output

If distributing the deputies in the required manner is impossible, print in a single line "NO" (without the quotes).

Otherwise, in the first line print "YES" (without the quotes), and in the second line print which deputy should be put in charge of each city. The i-th number should represent the number of the deputy (from 1 to k), who should be in charge of city numbered i-th in the input — overall there should be n numbers.

If there are multiple solutions, print any of them.

Examples

Input

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


Output

YES
1 2 1 2 2 1 

Input

3 1
1 2


Output

NO

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Solution {
    
    static ArrayList< ArrayList<Integer> > d = new ArrayList< ArrayList<Integer> >();
    static int[] mark, l, r;
    static int lc = 0, rc = 0;

    static final void split(int n) {
        l = new int[n];
        r = new int[n];
        mark = new int[n];
        int[] q = new int[n];

        for (int i = 0; i < n; i++)
            if (mark[i] == 0) {
                int ql = 0, qr = 0;
                q[0] = i;
                mark[i] = 1;
                while (ql <= qr) {
                    for (Integer j: d.get(q[ql]))
                        if (mark[j] == 0) {
                            mark[j] = 3 - mark[q[ql]];
                            q[++qr] = j;
                        }
                    ql++;
                }
            }
    
        for (int i = 0; i < n; i++)
            if (mark[i] == 1) l[lc++] = i;
            else r[rc++] = i;
    }
    
    static int findMinDeg(int n, int[] deg, int c) {
        int res = n, x = 0;
        for (int i = 0; i < n; i++)
            if (mark[i] == c && deg[i] < res) {
                res = deg[i];
                x = i;
            }
        return x;
    }
    
    static ArrayList<Integer> getNonAdj(ArrayList<Integer> e, int n, int c) {
        int[] z = new int[n];
        for (Integer i: e)
            z[i.intValue()] = -1;
        
        ArrayList<Integer> res = new ArrayList<Integer>();
        for (int i = 0; i < n; i++) {
            if (mark[i] == c && z[i] == 0)
                res.add(i);
        }
        return res;
    }
    
    public static void main(String[] agrs) {
        FastScanner in = new FastScanner(System.in);
        int n = in.nextInt(), m = in.nextInt();
        if (n == 3) {
            if (m > 0) System.out.println("NO");
            else {
                System.out.println("YES");
                System.out.println("1 1 1");
            }
            return;
        }
        
        //ArrayList< ArrayList <Integer> > d = new ArrayList< ArrayList<Integer> >();
        for (int i = 0; i < n; i++)
            d.add(new ArrayList<Integer>());
        
        for (int i = 0; i < m; i++) {
            int x = in.nextInt() - 1, y = in.nextInt() - 1;
            d.get(x).add(y);
            d.get(y).add(x);
        }
        split(n);
        int deg[] = new int[n];
        for (int i = 0; i < n; i++)
            deg[i] = d.get(i).size();
        
        int[] master = new int[n];
        Arrays.fill(master, -1);
        
        if (lc % 3 == 0) {
            System.out.println("YES");
            int k = 0;
            for (int i = 0; i < lc; i++)
                master[l[i]] = (k++) / 3;
            for (int i = 0; i < rc; i++)
                master[r[i]] = (k++) / 3;
            
        } else {
            if (lc % 3 == 1) {
                int[] t = l;
                l = r;
                r = t;
                int w = lc;
                lc = rc;
                rc = w;
                for (int i = 0; i < n; i++)
                    mark[i] = 3 - mark[i];
            }
            // lc % 3 == 2
            int x = findMinDeg(n, deg, 2);
            if (deg[x] == lc) {
                System.out.println("NO");
                return;
            }
            if (deg[x] <= lc - 2) {
                master[x] = n / 3 - 1;
                ArrayList<Integer> na = getNonAdj(d.get(x), n, 1);
                master[na.get(0)] = master[na.get(1)] = n / 3 - 1;
                System.out.println("YES");
                int k = 0;
                for (int i = 0; i < lc; i++)
                    if (master[l[i]] == -1) master[l[i]] = (k++) / 3;
                for (int i = 0; i < rc; i++)
                    if (master[r[i]] == -1) master[r[i]] = (k++) / 3;
                
            } else {
                //deg[x] == lc - 1
                x = findMinDeg(n, deg, 1);
                if (deg[x] >= rc - 1) {
                    System.out.println("NO");
                    return;
                }
                int u = 0;
                for (int i = 0; i < lc; i++) 
                    if (deg[l[i]] < rc - 1) {
                        u++;
                    }
                
                if (u < 2) {
                    System.out.println("NO");
                    return;
                }
                System.out.println("YES");
                u = 2;
                for (int i = 0; i < lc && u > 0; i++)
                    if (deg[l[i]] < rc - 1) {
                        ArrayList<Integer> na = getNonAdj(d.get(l[i]), n, 2);
                        master[na.get(0)] = n / 3 - u;
                        master[na.get(1)] = n / 3 - u;
                        master[l[i]] = n / 3 - u;
                        u--;
                    }
                
                int k = 0;
                for (int i = 0; i < lc; i++)
                    if (master[l[i]] == -1) master[l[i]] = (k++) / 3;
                for (int i = 0; i < rc; i++)
                    if (master[r[i]] == -1) master[r[i]] = (k++) / 3;

            }
        }
        for (int i = 0; i < n; i++)
            System.out.print((master[i] + 1) + " ");
        
    }
}


final class FastScanner {
    private StringTokenizer stringTokenizer = null;
    private BufferedReader bufferedReader; 
    
    public FastScanner(InputStream in) {
        bufferedReader = new BufferedReader(new InputStreamReader(in));
        try {
            stringTokenizer = new StringTokenizer(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    
    public String next() {
        while (!stringTokenizer.hasMoreTokens())
            try {
                stringTokenizer = new StringTokenizer(bufferedReader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
        return stringTokenizer.nextToken();
    }
    
    public int nextInt() {
        return Integer.parseInt(next());
    }
    
    public long nextLong() {
        return Long.parseLong(next());
    }
    
    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public boolean hasNext() {
        return stringTokenizer.hasMoreTokens();
    }
    
    public void nextLine() {
        try {
            stringTokenizer = new StringTokenizer(bufferedReader.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}