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.util.Comparator;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD_Namestnechestvo solver = new TaskD_Namestnechestvo();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD_Namestnechestvo {
    Graph g;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        g = new Graph();
        int n = in.nextInt();
        int m = in.nextInt();
        g.initGraph(n, m);
        for (int i = 0; i < m; ++i) {
            g.addEdge(in.nextInt()-1, in.nextInt()-1);
        }
        int[] color = new int[n];
        Arrays.fill(color, -1);
        for (int i = 0; i < n; ++i) {
            if (color[i] == -1) {
                dfs(i, color, 0);
            }
        }
        int[] am = new int[2];
        for (int i = 0; i < n; ++i) {
            ++am[color[i]];
        }
        int[] res = new int[n];
        if (am[0] % 3 == 0) {
            int c = 1;
            int a = 0;
            for (int i = 0; i < n; ++i) {
                if (color[i] == 0) {
                    res[i] = c;
                    ++a;
                    if (a == 3) {
                        a = 0;
                        ++c;
                    }
                }
            }
            for (int i = 0; i < n; ++i) {
                if (color[i] == 1) {
                    res[i] = c;
                    ++a;
                    if (a == 3) {
                        a = 0;
                        ++c;
                    }
                }
            }
            out.println("YES");
            out.println(ArrayUtils.toString(res));
            return;
        }
        if (am[1] % 3 == 1) {
            for (int i = 0; i < n; ++i) {
                color[i] = 1 - color[i];
            }
            int t = am[0];
            am[0] = am[1];
            am[1] = t;
        }

        Arrays.fill(res, -1);
        for (int i = 0; i < n; ++i) {
            if (color[i] == 0) {
                int amTo1 = 0;
                for (int e = g.first[i]; e != -1; e = g.next[e]) {
                    if (color[g.to[e]] == 1) {
                        ++amTo1;
                    }
                }
                if (amTo1 + 2 <= am[1]) {
                    Set<Integer> allV = new HashSet<Integer>();
                    for (int j = 0; j < n; ++j) {
                        if (color[j] == 1) {
                            allV.add(j);
                        }
                    }
                    for (int e = g.first[i]; e != -1; e = g.next[e]) {
                        if (color[g.to[e]] == 1) {
                            allV.remove(g.to[e]);
                        }
                    }

                    int c = 2;
                    res[i] = 1;
                    int v = allV.iterator().next();
                    res[v] = 1;
                    allV.remove(v);
                    v = allV.iterator().next();
                    res[v] = 1;
                    int a = 0;
                    for (i = 0; i < n; ++i) {
                        if (res[i] != -1) continue;
                        if (color[i] == 0) {
                            res[i] = c;
                            ++a;
                            if (a == 3) {
                                a = 0;
                                ++c;
                            }
                        }
                    }
                    for (i = 0; i < n; ++i) {
                        if (res[i] != -1) continue;
                        if (color[i] == 1) {
                            res[i] = c;
                            ++a;
                            if (a == 3) {
                                a = 0;
                                ++c;
                            }
                        }
                    }
                    out.println("YES");
                    out.println(ArrayUtils.toString(res));
                    return;
                }
            }
        }



        Set<Integer> set1 = new HashSet<Integer>();
        for (int i = 0; i < n; ++i) {
            if (color[i] == 1) {
                int amTo0 = 0;
                

                for (int e = g.first[i]; e != -1; e = g.next[e]) {
                    if (color[g.to[e]] == 0) {
                        ++amTo0;
                    }
                }
                if (amTo0 + 2 <= am[0]) {
                    set1.add(i);
                }
                if (set1.size() == 2) {
                    int u = set1.iterator().next();
                    set1.remove(u);
                    Set<Integer> allV = new HashSet<Integer>();
                    for (int j = 0; j < n; ++j) {
                        if (color[j] == 0) {
                            allV.add(j);
                        }
                    }
                    for (int e = g.first[u]; e != -1; e = g.next[e]) {
                        if (color[g.to[e]] == 0) {
                            allV.remove(g.to[e]);
                        }
                    }

                    res[u] = 1;
                    int v = allV.iterator().next();
                    res[v] = 1;
                    allV.remove(v);
                    v = allV.iterator().next();
                    res[v] = 1;

                    u = set1.iterator().next();
                    set1.remove(u);
                    allV = new HashSet<Integer>();
                    for (int j = 0; j < n; ++j) {
                        if (color[j] == 0) {
                            allV.add(j);
                        }
                    }
                    for (int e = g.first[u]; e != -1; e = g.next[e]) {
                        if (color[g.to[e]] == 0) {
                            allV.remove(g.to[e]);
                        }
                    }

                    res[u] = 2;
                    v = allV.iterator().next();
                    res[v] = 2;
                    allV.remove(v);
                    v = allV.iterator().next();
                    res[v] = 2;


                    int c = 3;

                    int a = 0;
                    for (i = 0; i < n; ++i) {
                        if (res[i] != -1) continue;
                        if (color[i] == 0) {
                            res[i] = c;
                            ++a;
                            if (a == 3) {
                                a = 0;
                                ++c;
                            }
                        }
                    }
                    for (i = 0; i < n; ++i) {
                        if (res[i] != -1) continue;
                        if (color[i] == 1) {
                            res[i] = c;
                            ++a;
                            if (a == 3) {
                                a = 0;
                                ++c;
                            }
                        }
                    }
                    out.println("YES");
                    out.println(ArrayUtils.toString(res));
                    return;
                }
            }
        }

        out.println("NO");
    }

    private void dfs(int v, int[] color, int cc) {
        color[v] = cc;
        for (int e = g.first[v]; e != -1; e = g.next[e]) {
            int to = g.to[e];
            if (color[to] == -1) {
                dfs(to, color, 1 - cc);
            }
        }
    }
}

class Graph {
    public int[] from;
    public int[] to;
    public int[] first;
    public int[] next;
    public int nVertex;
    public int nEdges;
    public int curEdge;

    public Graph() {}

    public void initGraph(int n, int m) {
        curEdge = 0;
        nVertex = n;
        nEdges = m;
        from = new int[m * 2];
        to = new int[m * 2];
        first = new int[n];
        next = new int[m * 2];
        Arrays.fill(first, -1);
    }

    public void addEdge(int a, int b) {
        next[curEdge] = first[a];
        first[a] = curEdge;
        to[curEdge] = b;
        from[curEdge] = a;
        ++curEdge;

        next[curEdge] = first[b];
        first[b] = curEdge;
        to[curEdge] = a;
        from[curEdge] = b;
        ++curEdge;
    }

}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

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

}

class ArrayUtils {

    public static String toString(int[] a) {
        StringBuilder result = new StringBuilder("");
        for (int x : a) result.append(x).append(' ');
        return result.substring(0, result.length()-1);
    }

}