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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n, m, fs[100010], to[300010], nx[300010], e, sz[300010], as, bs, l[300010],
    op, ed, yoo, aya, ans[100010];
bool p[100010], done[100010], q[100010], r[100010];
void ins(int x, int y) {
  nx[++e] = fs[x];
  fs[x] = e;
  to[e] = y;
  nx[++e] = fs[y];
  fs[y] = e;
  to[e] = x;
}
int main() {
  cin >> n >> m;
  for (int i = 1, x, y; i <= m; ++i) {
    cin >> x >> y;
    ins(x, y);
    sz[x]++;
    sz[y]++;
  }
  for (int i = 1; i <= n; ++i)
    if (!done[i]) {
      for (done[l[op = ed = 0] = i] = 1; op <= ed; ++op)
        for (int v = fs[l[op]]; v; v = nx[v])
          if (!done[to[v]]) {
            done[to[v]] = 1;
            p[to[v]] = p[l[op]] ^ 1;
            l[++ed] = to[v];
          }
    }
  for (int i = 1; i <= n; ++i)
    if (!p[i])
      as++;
    else
      bs++;
  if (as % 3 == 0) {
    cout << "YES" << endl;
    int out = 0;
    for (int i = 1; i <= n; ++i)
      if (p[i]) ans[i] = (out++) / 3 + 1;
    for (int i = 1; i <= n; ++i)
      if (!p[i]) ans[i] = (out++) / 3 + 1;
    for (int i = 1; i <= n; ++i) cout << ans[i] << ' ';
    cout << endl;
    return 0;
  }
  if (as % 3 == 2) {
    for (int i = 1; i <= n; ++i) p[i] ^= 1;
    swap(as, bs);
  }
  for (int i = 1; i <= n; ++i)
    if (!p[i]) {
      if (sz[i] <= bs - 2) {
        cout << "YES" << endl;
        int out = 3;
        ans[i] = 1;
        for (int v = fs[i]; v; v = nx[v])
          if (p[to[v]]) q[to[v]] = 1;
        for (int j = 1, k = 0; j <= n && k < 2; ++j)
          if (p[j] && !q[j]) {
            ans[j] = 1;
            k++;
          }
        for (int j = 1; j <= n; ++j)
          if (!p[j] && j != i) ans[j] = (out++) / 3 + 1;
        for (int j = 1; j <= n; ++j)
          if (p[j] && ans[j] != 1) ans[j] = (out++) / 3 + 1;
        for (int j = 1; j <= n; ++j) cout << ans[j] << ' ';
        cout << endl;
        return 0;
      }
    }
  memset(q, 0, sizeof q);
  for (int i = 1; i <= n; ++i)
    if (p[i] && (yoo == 0 || as - sz[i] > as - sz[yoo])) yoo = i;
  for (int v = fs[yoo]; v; v = nx[v]) q[to[v]] = 1;
  int opt = 0;
  for (int i = 1; i <= n; ++i)
    if (p[i] && i != yoo && as - sz[i] >= 2) {
      int c = 0, a = as - sz[yoo], b = as - sz[i];
      for (int v = fs[i]; v; v = nx[v])
        if (!q[to[v]]) c++;
      c = a - c;
      if (a >= 2 && b >= 2 && a + b - c >= 4) {
        int out = 6, k = 0;
        cout << "YES" << endl;
        for (int v = fs[i]; v; v = nx[v]) r[to[v]] = 1;
        ans[i] = 1;
        for (int j = 1; j <= n && k < 2; ++j)
          if (!p[j] && !r[j] && q[j]) {
            ans[j] = 1;
            k++;
          }
        for (int j = 1; j <= n && k < 2; ++j)
          if (!p[j] && !r[j]) {
            ans[j] = 1;
            k++;
          }
        k = 0;
        ans[yoo] = 2;
        for (int j = 1; j <= n && k < 2; ++j)
          if (!p[j] && !q[j] && !ans[j]) {
            ans[j] = 2;
            k++;
          }
        for (int j = 1; j <= n; ++j)
          if (!p[j] && !ans[j]) ans[j] = (out++) / 3 + 1;
        for (int j = 1; j <= n; ++j)
          if (p[j] && !ans[j]) ans[j] = (out++) / 3 + 1;
        for (int j = 1; j <= n; ++j) cout << ans[j] << ' ';
        cout << endl;
        return 0;
      }
    }
  cout << "NO" << endl;
  return 0;
}