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>
int n, m;
struct Edge {
  int s, t;
  int nxt;
} e[2 * 110000];
int p[110000], d[110000], c[110000], v[110000];
int stk[110000], top;
int main() {
  scanf("%d%d", &n, &m);
  memset(p, -1, sizeof(p));
  memset(d, 0, sizeof(p));
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[2 * i].s = x;
    e[2 * i].t = y;
    e[2 * i + 1].s = y;
    e[2 * i + 1].t = x;
    e[2 * i].nxt = p[x];
    p[x] = 2 * i;
    e[2 * i + 1].nxt = p[y];
    p[y] = 2 * i + 1;
    ++d[x];
    ++d[y];
  }
  memset(c, 0, sizeof(c));
  int c0 = 0, c1 = 0, c2 = 0;
  for (int i = 1; i <= n; i++)
    if (!c[i]) {
      c[i] = 1;
      stk[0] = i;
      top = 0;
      while (top >= 0) {
        int x = stk[top--];
        if (c[x] == 1)
          ++c1;
        else
          ++c2;
        if (d[x] == 0) ++c0;
        for (int y = p[x]; y >= 0; y = e[y].nxt)
          if (!c[e[y].t]) {
            c[e[y].t] = 3 - c[x];
            stk[++top] = e[y].t;
          }
      }
    }
  int cx = -1, dx = n + 1;
  if (c1 % 3 == 1) {
    if (c0 >= 1) {
      for (int i = 1; i <= n; i++)
        if (d[i] == 0) {
          c[i] = 2;
          c1--;
          c2++;
          break;
        }
    } else {
      cx = 1;
      dx = c2;
    }
  } else if (c1 % 3 == 2) {
    if (c0 >= 2) {
      for (int i = 1, j = 2; i <= n && j; i++)
        if (d[i] == 0) {
          c[i] = 2;
          --j;
          c1--;
          c2++;
        }
    } else {
      cx = 2;
      dx = c1;
    }
  }
  memset(v, 0, sizeof(v));
  if (cx >= 0) {
    int x, y, z;
    x = -1;
    for (int i = 1; i <= n; i++)
      if (c[i] == cx && d[i] <= dx - 2) {
        x = i;
        break;
      }
    if (x >= 0) {
      v[x] = 1;
      int cl = 2, cc = 3;
      y = -1;
      z = -1;
      for (int i = p[x]; i >= 0; i = e[i].nxt) {
        v[e[i].t] = cl;
        --cc;
        if (cc == 0) {
          ++cl;
          cc = 3;
        }
      }
      for (int i = 1; i <= n; i++)
        if (c[i] != cx && !v[i]) {
          if (y < 0) {
            v[i] = 1;
            y = i;
          } else if (z < 0) {
            v[i] = 1;
            z = i;
          } else {
            v[i] = cl;
            --cc;
            if (cc == 0) {
              ++cl;
              cc = 3;
            }
          }
        }
      assert(cc == 3);
      for (int i = 1; i <= n; i++)
        if (c[i] == cx && !v[i]) {
          v[i] = cl;
          --cc;
          if (cc == 0) {
            ++cl;
            cc = 3;
          }
        }
    } else {
      x = -1;
      y = -1;
      cx = 3 - cx;
      dx = c1 + c2 - dx;
      for (int i = 1; i <= n; i++)
        if (c[i] == cx && d[i] <= dx - 2) {
          if (x < 0)
            x = i;
          else if (y < 0) {
            y = i;
            break;
          }
        }
      if (y >= 0) {
        int ux = 2, uy = 2;
        v[x] = 1;
        v[y] = 2;
        int cl = 3, cc = 3;
        for (int i = p[x]; i >= 0; i = e[i].nxt) c[e[i].t] |= 4;
        for (int i = p[y]; i >= 0; i = e[i].nxt) c[e[i].t] |= 8;
        for (int i = p[x]; i >= 0 && uy; i = e[i].nxt) {
          if (!(c[e[i].t] & 8)) {
            v[e[i].t] = 2;
            --uy;
          }
        }
        for (int i = p[y]; i >= 0 && ux; i = e[i].nxt) {
          if (!(c[e[i].t] & 4)) {
            v[e[i].t] = 1;
            --ux;
          }
        }
        for (int i = 1; i <= n; i++)
          if (c[i] != cx && !v[i]) {
            if (ux > 0 && !(c[i] & 4)) {
              v[i] = 1;
              --ux;
            } else if (uy > 0 && !(c[i] & 8)) {
              v[i] = 2;
              --uy;
            } else {
              v[i] = cl;
              --cc;
              if (cc == 0) {
                ++cl;
                cc = 3;
              }
            }
          }
        assert(cc == 3);
        for (int i = 1; i <= n; i++)
          if (c[i] == cx && !v[i]) {
            v[i] = cl;
            --cc;
            if (cc == 0) {
              ++cl;
              cc = 3;
            }
          }
      } else {
        printf("NO\n");
        return 0;
      }
    }
  } else {
    int cl = 1, cc = 3;
    for (cx = 1; cx <= 2; cx++) {
      assert(cc == 3);
      for (int i = 1; i <= n; i++)
        if (c[i] == cx) {
          v[i] = cl;
          --cc;
          if (cc == 0) {
            ++cl;
            cc = 3;
          }
        }
    }
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d%c", v[i], (i < n ? ' ' : '\n'));
  return 0;
}