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, cnt[10], c[200000], ans[200000], a[10];
vector<int> e[200000], g1, g2, v[200000];
bool u[200000], used[200000], G[200000];
inline void dfs(int v, int color) {
  c[v] = color;
  ++cnt[color];
  for (typeof(e[v].begin()) it = e[v].begin(); it != e[v].end(); ++it) {
    int to = *it;
    if (!c[to]) dfs(to, 3 - color);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    --x, --y;
    e[x].push_back(y), e[y].push_back(x);
  }
  for (int i = 0; i < n; ++i)
    if (!c[i]) dfs(i, 1);
  if (cnt[1] % 3 == 2) {
    swap(cnt[1], cnt[2]);
    for (int i = 0; i < n; ++i) c[i] = 3 - c[i];
  }
  for (int i = 0; i < n; ++i) {
    if (c[i] == 1)
      g1.push_back(i);
    else
      g2.push_back(i);
  }
  if (cnt[1] % 3 == 0) {
    puts("YES");
    int l = 0;
    for (typeof(g1.begin()) it = g1.begin(); it != g1.end(); ++it) {
      ans[*it] = (++l + 2) / 3;
    }
    for (typeof(g2.begin()) it = g2.begin(); it != g2.end(); ++it) {
      ans[*it] = (++l + 2) / 3;
    }
    for (int i = 0; i < n; ++i) printf("%d ", ans[i]);
    return 0;
  }
  int ind = -1;
  for (int i = 0; i < n; ++i)
    if (c[i] == 1) {
      if ((int)e[i].size() < cnt[2] - 1) {
        ind = i;
        break;
      }
    }
  if (ind >= 0) {
    puts("YES");
    int l = 1;
    ans[ind] = 1;
    for (typeof(e[ind].begin()) it = e[ind].begin(); it != e[ind].end(); ++it) {
      u[*it] = true;
    }
    used[ind] = true;
    for (int i = 0; i < n && l < 3; ++i) {
      if (c[i] == 2 && !u[i]) {
        ++l;
        ans[i] = 1;
        used[i] = true;
      }
    }
    for (typeof(g1.begin()) it = g1.begin(); it != g1.end(); ++it)
      if (!used[*it]) {
        ans[*it] = (++l + 2) / 3;
      }
    for (typeof(g2.begin()) it = g2.begin(); it != g2.end(); ++it)
      if (!used[*it]) {
        ans[*it] = (++l + 2) / 3;
      }
    for (int i = 0; i < n; ++i) printf("%d ", ans[i]);
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    if (c[i] == 1 && (int)e[i].size() == cnt[2] - 1) u[i] = true;
  }
  int z = 0;
  for (int i = 0; i < n; ++i)
    if (u[i]) {
      for (typeof(e[i].begin()) it = e[i].begin(); it != e[i].end(); ++it) {
        used[*it] = true;
      }
      for (typeof(g2.begin()) it = g2.begin(); it != g2.end(); ++it)
        if (!used[*it]) {
          v[*it].push_back(i);
          break;
        }
      for (typeof(e[i].begin()) it = e[i].begin(); it != e[i].end(); ++it)
        used[*it] = false;
    }
  for (int i = 0; i < n && z < 2; ++i) {
    if (c[i] == 2 && v[i].size() > 1) a[++z] = i;
  }
  if (z < 2) {
    puts("NO");
    return 0;
  }
  ans[a[1]] = ans[v[a[1]][0]] = ans[v[a[1]][1]] = 1;
  ans[a[2]] = ans[v[a[2]][0]] = ans[v[a[2]][1]] = 2;
  G[a[1]] = G[v[a[1]][0]] = G[v[a[1]][1]] = true;
  G[a[2]] = G[v[a[2]][0]] = G[v[a[2]][1]] = true;
  z = 6;
  for (typeof(g1.begin()) it = g1.begin(); it != g1.end(); ++it) {
    if (!G[*it]) ans[*it] = (++z + 2) / 3;
  }
  for (typeof(g2.begin()) it = g2.begin(); it != g2.end(); ++it) {
    if (!G[*it]) ans[*it] = (++z + 2) / 3;
  }
  puts("YES");
  for (int i = 0; i < n; ++i) printf("%d ", ans[i]);
  return 0;
}