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 int max_n = 100005, max_e = 200010;
bool was[max_n];
int color[max_n];
struct Edge {
  int v;
  Edge* next;
  void addEdge(int v, Edge*& head) {
    this->v = v;
    this->next = head;
    head = this;
  }
} edges[max_e];
Edge* h[max_n];
int r[max_n];
int wh[max_n];
void addEdge(int v1, int v2) {
  static Edge* e = edges;
  (e++)->addEdge(v1, h[v2]);
  (e++)->addEdge(v2, h[v1]);
}
void dfs(int v, int c) {
  was[v] = true;
  color[v] = c;
  for (Edge* e = h[v]; e; e = e->next) {
    if (!was[e->v]) {
      dfs(e->v, c ^ 1);
    }
  }
}
int curt = 0;
int n, m;
int ou[2];
int oc[2][max_n];
int st[2] = {0, 0};
void try1(int c) {
  int* oc = ::oc[c ^ 1];
  int u = st[c ^ 1];
  for (int i = 0; i < n; i++) {
    if (color[i] == c) {
      ++curt;
      for (Edge* e = h[i]; e; e = e->next) {
        wh[e->v] = curt;
      }
      int v1 = -1, v2 = -1;
      for (int j = 0; j < u; j++) {
        int v = oc[j];
        if (wh[v] != curt) {
          if (v1 == -1) {
            v1 = v;
          } else {
            v2 = v;
            break;
          }
        }
      }
      if (v2 != -1) {
        int k = n / 3;
        r[i] = k;
        r[v1] = k;
        r[v2] = k;
        st[c]--;
        st[c ^ 1] -= 2;
        return;
      }
    }
  }
}
void try2(int c) {
  if (st[c] < 2 || st[c ^ 1] < 4) return;
  int* oc = ::oc[c ^ 1];
  int u = st[c ^ 1];
  int g1 = -1, g2 = -1;
  int c1[4] = {-1, -1, -1, -1}, c2[4];
  for (int i = 0; i < n; i++) {
    if (color[i] == c) {
      ++curt;
      for (Edge* e = h[i]; e; e = e->next) {
        wh[e->v] = curt;
      }
      int v[4] = {-1, -1, -1, -1};
      for (int j = 0; j < u; j++) {
        int vx = oc[j];
        if (wh[vx] != curt) {
          if (v[0] == -1) {
            v[0] = vx;
          } else if (v[1] == -1) {
            v[1] = vx;
          } else if (v[2] == -1) {
            v[2] = vx;
          } else if (v[3] == -1) {
            v[3] = vx;
            break;
          }
        }
      }
      if (v[1] == -1) continue;
      if (g1 == -1) {
        g1 = i;
        memcpy(c1, v, sizeof(v));
      } else {
        int v1, v2, v3, v4;
        for (int i11 = 0; i11 < 4 && c1[i11] != -1; i11++) {
          v1 = c1[i11];
          for (int i12 = i11 + 1; i12 < 4 && c1[i12] != -1; i12++) {
            v2 = c1[i12];
            for (int i21 = 0; i21 < 4 && v[i21] != -1; i21++) {
              v3 = v[i21];
              if (v3 != v1 && v3 != v2) {
                for (int i22 = i21 + 1; i22 < 4 && v[i22] != -1; i22++) {
                  v4 = v[i22];
                  if (v4 != v1 && v4 != v2) {
                    int k = n / 3;
                    r[g1] = k;
                    r[v1] = k;
                    r[v2] = k;
                    r[i] = k - 1;
                    r[v3] = k - 1;
                    r[v4] = k - 1;
                    st[c] -= 2;
                    st[c ^ 1] -= 4;
                    return;
                  }
                }
              }
            }
          }
        }
        if (g2 != -1) {
          for (int i11 = 0; i11 < 4 && c2[i11] != -1; i11++) {
            v1 = c2[i11];
            for (int i12 = i12 + 1; i12 < 4 && c2[i12] != -1; i12++) {
              v2 = c2[i12];
              for (int i21 = 0; i21 < 4 && v[i21] != -1; i21++) {
                v3 = v[i21];
                if (v3 != v1 && v3 != v2) {
                  for (int i22 = i21 + 1; i22 < 4 && v[i22] != -1; i22++) {
                    v4 = v[i22];
                    if (v4 != v1 && v4 != v2) {
                      int k = n / 3;
                      r[g2] = k;
                      r[v1] = k;
                      r[v2] = k;
                      r[i] = k - 1;
                      r[v3] = k - 1;
                      r[v4] = k - 1;
                      st[c] -= 2;
                      st[c ^ 1] -= 4;
                      return;
                    }
                  }
                }
              }
            }
          }
        }
        bool good = false;
        for (int i = 0; i < 4 && c2[i] != -1; i++) {
          good = true;
          for (int j = 0; j < 4; j++) {
            if (c2[i] == c1[j]) {
              good = false;
              break;
            }
          }
          if (good) {
            g2 = i;
            memcpy(c2, v, sizeof(v));
            break;
          }
        }
      }
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int v1, v2;
    scanf("%d %d", &v1, &v2);
    v1--, v2--;
    addEdge(v1, v2);
  }
  for (int i = 0; i < n; i++) {
    if (!was[i]) {
      dfs(i, 0);
    }
    int c = color[i];
    oc[c][st[c]++] = i;
  }
  if (st[0] % 3 == 1) {
    try1(0);
  } else if (st[1] % 3 == 1) {
    try1(1);
  }
  if (st[0] % 3 == 2) {
    try2(0);
  } else if (st[1] % 3 == 2) {
    try2(1);
  }
  if (st[0] % 3 != 0) {
    printf("NO\n");
    return 0;
  }
  int ri = 1;
  for (int i = 0, j = 0; i < n; i++) {
    if (color[i] && !r[i]) {
      r[i] = ri;
      if (++j == 3) {
        ri++;
        j = 0;
      }
    }
  }
  for (int i = 0, j = 0; i < n; i++) {
    if (!color[i] && !r[i]) {
      r[i] = ri;
      if (++j == 3) {
        ri++;
        j = 0;
      }
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%d ", r[i]);
  }
  return 0;
}