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;
pair<int, int> e[100000];
vector<int> L[100001];
int Q[100001], head, tail, color[100001];
vector<int> A, B, not_adj[100001];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0, u, v; i < m; ++i) {
    scanf("%d %d", &u, &v);
    e[i] = make_pair(u, v);
    L[u].push_back(v);
    L[v].push_back(u);
  }
  memset(color, -1, sizeof color);
  for (int i = 1; i <= n; ++i) {
    if (color[i] == -1) {
      head = tail = 0;
      Q[tail++] = i;
      color[i] = 0;
      while (head < tail) {
        int cur = Q[head++];
        if (color[cur] == 0)
          A.push_back(cur);
        else
          B.push_back(cur);
        for (int j = L[cur].size() - 1, to; j >= 0; --j) {
          to = L[cur][j];
          if (color[to] == -1) {
            Q[tail++] = to;
            color[to] = color[cur] ^ 1;
          }
        }
      }
    }
  }
  bool ok = false;
  if (A.size() % 3 == 0) {
    ok = true;
    int cont = 1;
    while (!A.empty()) {
      for (int it = 0; it < 3 && !A.empty(); ++it) {
        color[A.back()] = cont;
        A.pop_back();
      }
      ++cont;
    }
    while (!B.empty()) {
      for (int it = 0; it < 3 && !B.empty(); ++it) {
        color[B.back()] = cont;
        B.pop_back();
      }
      ++cont;
    }
  } else {
    if (A.size() % 3 == 2) swap(A, B);
    int colorA = color[A[0]];
    for (int i = 0; i < m; ++i)
      if (color[e[i].first] != colorA) swap(e[i].first, e[i].second);
    sort(e, e + m);
    sort(A.begin(), A.end());
    sort(B.begin(), B.end());
    int szA = A.size(), szB = B.size();
    for (int i = 0, j = 0; i < szA; ++i) {
      int k = j;
      while (k < m && e[k].first == A[i]) ++k;
      if (k - j <= szB - 2) {
        ok = true;
        vector<int> aux;
        int cont = 0;
        for (int a = 0, b = j, u; a < szB && cont < 2; ++a) {
          u = B[a];
          if (b == k || u != e[b].second) {
            aux.push_back(u);
            ++cont;
          } else
            ++b;
        }
        memset(color, -1, sizeof color);
        color[A[i]] = color[aux[0]] = color[aux[1]] = 1;
        cont = 2;
        while (!A.empty()) {
          for (int it = 0; it < 3 && !A.empty();) {
            if (color[A.back()] == -1) {
              color[A.back()] = cont;
              ++it;
            }
            A.pop_back();
            if (it == 3) ++cont;
          }
        }
        while (!B.empty()) {
          for (int it = 0; it < 3 && !B.empty();) {
            if (color[B.back()] == -1) {
              color[B.back()] = cont;
              ++it;
            }
            B.pop_back();
            if (it == 3) ++cont;
          }
        }
        break;
      } else if (k - j == szB - 1) {
        for (int a = 0, b = j, u; a < szB; ++a) {
          u = B[a];
          if (b == k || u != e[b].second) {
            not_adj[u].push_back(A[i]);
            break;
          } else
            ++b;
        }
      }
      j = k;
    }
    if (!ok) {
      for (int i = 0; i < szB; ++i) {
        if (not_adj[B[i]].size() >= 2) {
          for (int j = i + 1; j < szB; ++j) {
            if (not_adj[B[j]].size() >= 2) {
              ok = true;
              memset(color, -1, sizeof color);
              color[B[i]] = color[not_adj[B[i]][0]] = color[not_adj[B[i]][1]] =
                  1;
              color[B[j]] = color[not_adj[B[j]][0]] = color[not_adj[B[j]][1]] =
                  2;
              int cont = 3;
              while (!A.empty()) {
                for (int it = 0; it < 3 && !A.empty();) {
                  if (color[A.back()] == -1) {
                    color[A.back()] = cont;
                    ++it;
                  }
                  A.pop_back();
                  if (it == 3) ++cont;
                }
              }
              while (!B.empty()) {
                for (int it = 0; it < 3 && !B.empty();) {
                  if (color[B.back()] == -1) {
                    color[B.back()] = cont;
                    ++it;
                  }
                  B.pop_back();
                  if (it == 3) ++cont;
                }
              }
              break;
            }
          }
          break;
        }
      }
    }
  }
  if (!ok)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; ++i) printf("%d ", color[i]);
    printf("\n");
  }
  return 0;
}