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;
vector<vector<int> > es;
vector<bool> was;
vector<int> vs[2];
void dfs(int v, int cd = 0) {
  if (was[v]) return;
  was[v] = true;
  vs[cd].push_back(v);
  for (int i = 0; i < ((int)(es[v]).size()); i++) dfs(es[v][i], !cd);
}
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) >= 1) {
    es = vector<vector<int> >(n);
    for (int i = 0; i < m; i++) {
      int a, b;
      scanf("%d%d", &a, &b), a--, b--;
      es[a].push_back(b);
      es[b].push_back(a);
    }
    assert(n % 3 == 0);
    vs[0].clear();
    vs[1].clear();
    was = vector<bool>(n, false);
    for (int i = 0; i < n; i++)
      if (!was[i]) dfs(i);
    if (((int)(vs[0]).size()) % 3 > ((int)(vs[1]).size()) % 3)
      vs[0].swap(vs[1]);
    sort(vs[0].begin(), vs[0].end());
    sort(vs[1].begin(), vs[1].end());
    vector<int> ans(n, -1);
    int cur = 0;
    if (((int)(vs[0]).size()) % 3 != 0) {
      assert(((int)(vs[0]).size()) % 3 == 1);
      assert(((int)(vs[1]).size()) % 3 == 2);
      int n1 = ((int)(vs[0]).size()), n2 = ((int)(vs[1]).size());
      bool g = false;
      for (int i = 0; i < ((int)(vs[0]).size()); i++) {
        int b = vs[0][i];
        if (((int)(es[b]).size()) <= n2 - 2) {
          fprintf(stderr, "Good!\n");
          vector<bool> was(n, false);
          for (int i2 = 0; i2 < ((int)(es[b]).size()); i2++)
            was[es[b][i2]] = true;
          vector<int> all;
          all.push_back(b);
          for (int i2 = 0;
               i2 < ((int)(vs[1]).size()) && ((int)(all).size()) < 3; i2++)
            if (!was[vs[1][i2]]) all.push_back(vs[1][i2]);
          assert(((int)(all).size()) == 3);
          for (int i2 = 0; i2 < ((int)(all).size()); i2++) ans[all[i2]] = cur;
          cur++;
          g = true;
          break;
        }
      }
      if (!g) {
        vector<int> nid(n, -1);
        for (int i = 0; i < ((int)(vs[1]).size()); i++) nid[vs[1][i]] = i;
        vector<vector<int> > pairs(n2);
        vector<bool> was(n2, false);
        for (int i = 0; i < ((int)(vs[0]).size()); i++) {
          int b = vs[0][i];
          fill(was.begin(), was.end(), false);
          for (int i2 = 0; i2 < ((int)(es[b]).size()); i2++) {
            int c = es[b][i2];
            assert(nid[c] >= 0);
            was[nid[c]] = true;
          }
          for (int i2 = 0; i2 < n2; i2++)
            if (!was[i2]) pairs[i2].push_back(b);
        }
        vector<int> bs;
        for (int i = 0; i < n2 && ((int)(bs).size()) < 2; i++)
          if (((int)(pairs[i]).size()) >= 2) {
            bs.push_back(i);
          }
        if (((int)(bs).size()) >= 2) {
          for (int i = 0; i < ((int)(bs).size()); i++) {
            int b = bs[i];
            vector<int> all;
            all.push_back(vs[1][b]);
            for (int i2 = 0; i2 < ((int)(pairs[b]).size()) && i2 < 2; i2++)
              all.push_back(pairs[b][i2]);
            for (int i2 = 0; i2 < ((int)(all).size()); i2++) ans[all[i2]] = cur;
            cur++;
          }
          fprintf(stderr, "OK\n");
        }
      }
    }
    for (int step = 0; step < 2; step++) {
      vector<int> all;
      for (int i = 0; i < ((int)(vs[step]).size()); i++) {
        if (ans[vs[step][i]] < 0) {
          all.push_back(vs[step][i]);
        }
        if (((int)(all).size()) == 3) {
          for (int i = 0; i < ((int)(all).size()); i++) ans[all[i]] = cur;
          cur++;
          all.clear();
        }
      }
    }
    bool g = true;
    for (int i = 0; i < n; i++) g = g && ans[i] >= 0;
    if (!g)
      printf("NO\n");
    else {
      printf("YES\n");
      for (int i = 0; i < n; i++) printf("%d%c", ans[i] + 1, "\n "[i + 1 < n]);
    }
    break;
  }
  return 0;
}