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;
struct side {
  int a, l;
} e[100005 * 2];
int start[100005], n, m, tot, d[100005], ans[100005];
int wh[100005], bl[100005], n1, n2, q[100005], p, bb[100005];
bool co[100005], vis[100005], bo[100005], del[100005];
void add(int x, int y) {
  d[x]++;
  d[y]++;
  e[++tot].l = start[x];
  e[tot].a = y;
  start[x] = tot;
  e[++tot].l = start[y];
  e[tot].a = x;
  start[y] = tot;
}
void bfs(int x) {
  int h = 0, t = 0;
  co[x] = 0;
  q[t = 1] = x;
  vis[x] = 1;
  while (h != t) {
    x = q[++h];
    if (co[x]) {
      bl[++n2] = x;
    } else
      wh[++n1] = x;
    for (int i = start[x]; i; i = e[i].l)
      if (!vis[e[i].a]) {
        q[++t] = e[i].a;
        co[e[i].a] = co[x] ^ 1;
        vis[q[t]] = 1;
      }
  }
}
int po[100005], kk[100005][2], cnt[100005];
bool check(int k) {
  if (k == 1) {
    int bbb = 0;
    for (int i = 1; i <= n1; ++i) {
      int x = wh[i];
      if (d[x] == n2) continue;
      for (int i = start[x]; i; i = e[i].l) bb[e[i].a] = x;
      for (int j = 1; j <= n2; ++j)
        if (bb[bl[j]] != x) {
          po[x] = bl[j];
          cnt[bl[j]]++;
          if (cnt[bl[j]] == 2) ++bbb;
          if (cnt[bl[j]] <= 2) kk[bl[j]][cnt[bl[j]] - 1] = x;
          break;
        }
    }
    if (bbb < 2) {
      puts("NO");
      exit(0);
    }
    bbb = 2;
    for (int j = 1; j <= n2; ++j)
      if (cnt[bl[j]] >= 2) {
        del[bl[j]] = 1;
        del[kk[bl[j]][0]] = 1;
        del[kk[bl[j]][1]] = 1;
        ans[bl[j]] = ++p;
        ans[kk[bl[j]][0]] = p;
        ans[kk[bl[j]][1]] = p;
        --bbb;
        if (!bbb) break;
      }
  } else {
    int bbb = 0;
    for (int i = 1; i <= n2; ++i) {
      int x = bl[i];
      if (d[x] == n1) continue;
      for (int i = start[x]; i; i = e[i].l) bb[e[i].a] = x;
      for (int j = 1; j <= n1; ++j)
        if (bb[wh[j]] != x) {
          po[x] = wh[j];
          cnt[wh[j]]++;
          if (cnt[wh[j]] == 2) ++bbb;
          if (cnt[wh[j]] <= 2) kk[wh[j]][cnt[wh[j]] - 1] = x;
          break;
        }
    }
    if (bbb < 2) {
      puts("NO");
      exit(0);
    }
    bbb = 2;
    for (int j = 1; j <= n1; ++j)
      if (cnt[wh[j]] >= 2) {
        del[wh[j]] = 1;
        del[kk[wh[j]][0]] = 1;
        del[kk[wh[j]][1]] = 1;
        ans[wh[j]] = ++p;
        ans[kk[wh[j]][0]] = p;
        ans[kk[wh[j]][1]] = p;
        --bbb;
        if (!bbb) break;
      }
  }
  int now;
  now = 3;
  for (int i = 1; i <= n1; ++i) {
    if (del[wh[i]]) continue;
    ++now;
    if (now > 3) now = 1, ++p;
    ans[wh[i]] = p;
  }
  now = 3;
  for (int i = 1; i <= n2; ++i) {
    if (del[bl[i]]) continue;
    ++now;
    if (now > 3) now = 1, ++p;
    ans[bl[i]] = p;
  }
  puts("YES");
  for (int i = 1; i <= n - 1; ++i) printf("%d ", ans[i]);
  printf("%d\n", ans[n]);
}
int main() {
  int x, y;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &x, &y);
    add(x, y);
  }
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) bfs(i);
  int p = 0, now;
  if (n1 % 3 == 0 && n2 % 3 == 0) {
    now = 3;
    for (int i = 1; i <= n1; ++i) {
      ++now;
      if (now > 3) now = 1, ++p;
      ans[wh[i]] = p;
    }
    now = 3;
    for (int i = 1; i <= n2; ++i) {
      ++now;
      if (now > 3) now = 1, ++p;
      ans[bl[i]] = p;
    }
    puts("YES");
    for (int i = 1; i <= n - 1; ++i) printf("%d ", ans[i]);
    printf("%d\n", ans[n]);
  } else {
    if (n1 % 3 == 1) {
      x = 0;
      for (int i = 1; i <= n1; ++i)
        if (d[wh[i]] <= n2 - 2) {
          x = wh[i];
          break;
        }
      if (!x) {
        check(1);
        return 0;
      }
      del[x] = 1;
      ans[x] = 1;
      for (int i = start[x]; i; i = e[i].l) bo[e[i].a] = 1;
      y = 0;
      for (int i = 1; i <= n2; ++i)
        if (!bo[bl[i]]) {
          ++y;
          del[bl[i]] = 1;
          ans[bl[i]] = 1;
          if (y == 2) break;
        }
    } else {
      x = 0;
      for (int i = 1; i <= n2; ++i)
        if (d[bl[i]] <= n1 - 2) {
          x = bl[i];
          break;
        }
      if (!x) {
        check(2);
        return 0;
      }
      del[x] = 1;
      ans[x] = 1;
      for (int i = start[x]; i; i = e[i].l) bo[e[i].a] = 1;
      y = 0;
      for (int i = 1; i <= n1; ++i)
        if (!bo[wh[i]]) {
          ++y;
          del[wh[i]] = 1;
          ans[wh[i]] = 1;
          if (y == 2) break;
        }
    }
    p = 1;
    now = 3;
    for (int i = 1; i <= n1; ++i) {
      if (del[wh[i]]) continue;
      ++now;
      if (now > 3) now = 1, ++p;
      ans[wh[i]] = p;
    }
    now = 3;
    for (int i = 1; i <= n2; ++i) {
      if (del[bl[i]]) continue;
      ++now;
      if (now > 3) now = 1, ++p;
      ans[bl[i]] = p;
    }
    puts("YES");
    for (int i = 1; i <= n - 1; ++i) printf("%d ", ans[i]);
    printf("%d\n", ans[n]);
  }
  return 0;
}