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;
const double PI = acos(-1.0);
const int MN = 100111;
int n, m, side[MN], visited[MN], res[MN];
vector<int> ke[MN];
vector<int> l1, l2;
void dfs(int u, int color, int &a, int &b) {
  side[u] = color;
  if (color == 0)
    a++;
  else
    b++;
  for (int i = 0, _a = (ke[u].size()); i < _a; i++) {
    int v = ke[u][i];
    if (side[v] < 0) {
      dfs(v, 1 - color, a, b);
    }
  }
}
void dfs2(int u) {
  visited[u] = 1;
  side[u] = 1 - side[u];
  for (int i = 0, _a = (ke[u].size()); i < _a; i++) {
    int v = ke[u][i];
    if (!visited[v]) {
      dfs2(v);
    }
  }
}
void reverse(int u) {
  memset(visited, 0, sizeof visited);
  dfs2(u);
}
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    memset(res, -1, sizeof res);
    for (int i = (1), _b = (n); i <= _b; i++) ke[i].clear();
    int u, v;
    while (m--) {
      scanf("%d%d", &u, &v);
      ke[u].push_back(v);
      ke[v].push_back(u);
    }
    memset(side, -1, sizeof side);
    l1.clear();
    l2.clear();
    for (int i = (1), _b = (n); i <= _b; i++)
      if (side[i] < 0) {
        int a = 0, b = 0;
        dfs(i, 0, a, b);
        if ((a - b + 3) % 3 == 1)
          l1.push_back(i);
        else if ((a - b + 3) % 3 == 2)
          l2.push_back(i);
      }
    int sum = n;
    for (int i = (1), _b = (n); i <= _b; i++) sum -= side[i];
    bool can = true;
    int cur = 1;
    if (sum % 3 == 0) {
    } else {
      if (sum % 3 == 2) {
        swap(l1, l2);
        for (int i = (1), _b = (n); i <= _b; i++) side[i] = 1 - side[i];
      }
      if (l1.size() > 0) {
        reverse(l1[0]);
      } else if (l2.size() > 1) {
        reverse(l2[0]);
        reverse(l2[1]);
      } else {
        can = false;
        memset(visited, 0, sizeof visited);
        int n1 = 0;
        for (int i = (1), _b = (n); i <= _b; i++)
          if (side[i] == 1) n1++;
        int n0 = n - n1;
        for (int i = (1), _b = (n); i <= _b; i++)
          if (side[i] == 0 && ke[i].size() <= n1 - 2) {
            for (int x = 0, _a = (ke[i].size()); x < _a; x++) {
              int j = ke[i][x];
              visited[j] = 1;
            }
            int u = -1, v = -1;
            for (int j = (1), _b = (n); j <= _b; j++)
              if (side[j] == 1 && !visited[j]) {
                if (u == -1)
                  u = j;
                else if (v == -1)
                  v = j;
              }
            if (u > 0 && v > 0) {
              can = true;
              side[i] = 1 - side[i];
              side[u] = 1 - side[u];
              side[v] = 1 - side[v];
              res[i] = res[u] = res[v] = cur++;
              break;
            }
            for (int x = 0, _a = (ke[i].size()); x < _a; x++) {
              int j = ke[i][x];
              visited[j] = 0;
            }
          }
        if (!can) {
          int _ = 0;
          for (int i1 = (1), _b = (n); i1 <= _b; i1++)
            if (side[i1] == 1 && ke[i1].size() <= n0 - 2)
              if (!can) {
                int __ = 0;
                for (int i2 = (i1 + 1), _b = (n); i2 <= _b; i2++)
                  if (side[i2] == 1 && ke[i2].size() <= n0 - 2) {
                    __++;
                    if (__ == 5) break;
                    for (int x = 0, _a = (ke[i1].size()); x < _a; x++)
                      visited[ke[i1][x]] = 1;
                    for (int x = 0, _a = (ke[i2].size()); x < _a; x++)
                      visited[ke[i2][x]] += 2;
                    int j1 = -1, j2 = -1, j3 = -1, j4 = -1;
                    for (int j = (1), _b = (n); j <= _b; j++)
                      if (side[j] == 0)
                        if (visited[j] & 1)
                          if (visited[j] < 2) {
                            if (j3 < 0)
                              j3 = j;
                            else if (j4 < 0)
                              j4 = j;
                          }
                    for (int j = (1), _b = (n); j <= _b; j++)
                      if (side[j] == 0)
                        if (visited[j] >= 2)
                          if ((visited[j] & 1) == 0) {
                            if (j1 < 0)
                              j1 = j;
                            else if (j2 < 0)
                              j2 = j;
                          }
                    for (int j = (1), _b = (n); j <= _b; j++)
                      if (side[j] == 0)
                        if (!visited[j]) {
                          if (j1 < 0)
                            j1 = j;
                          else if (j2 < 0)
                            j2 = j;
                          else if (j3 < 0)
                            j3 = j;
                          else if (j4 < 0)
                            j4 = j;
                        }
                    if (j1 > 0 && j2 > 0 && j3 > 0 && j4 > 0) {
                      can = true;
                      res[i1] = res[j1] = res[j2] = cur++;
                      res[i2] = res[j3] = res[j4] = cur++;
                      side[i1] = 1 - side[i1];
                      side[i2] = 1 - side[i2];
                      side[j1] = 1 - side[j1];
                      side[j2] = 1 - side[j2];
                      side[j3] = 1 - side[j3];
                      side[j4] = 1 - side[j4];
                      break;
                    }
                    for (int x = 0, _a = (ke[i1].size()); x < _a; x++)
                      visited[ke[i1][x]] = 0;
                    for (int x = 0, _a = (ke[i2].size()); x < _a; x++)
                      visited[ke[i2][x]] = 0;
                  }
                _++;
                if (_ == 2) break;
              }
        }
      }
    }
    if (!can) {
      puts("NO");
      continue;
    }
    puts("YES");
    int has = 0;
    for (int turn = 0, _a = (2); turn < _a; turn++) {
      for (int i = (1), _b = (n); i <= _b; i++)
        if (side[i] == turn && res[i] < 0) {
          res[i] = cur;
          has++;
          if (has == 3) {
            cur++;
            has = 0;
          }
        }
    }
    for (int i = (1), _b = (n); i <= _b; i++) printf("%d ", res[i]);
    puts("");
  }
  return 0;
}