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<int> a[100005];
int g[100005];
int u[100005];
int ans[100005];
void dfs(int x, int c) {
  u[x] = 1;
  g[x] = c;
  for (int i = 0; i < (int)a[x].size(); i++) {
    if (!u[a[x][i]]) dfs(a[x][i], 1 - c);
  }
}
int n, m;
void OUTPUT_YES() {
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  puts("");
}
void OUTPUT_NO() { puts("NO"); }
bool case1(vector<int> &s, vector<int> &t) {
  int best = 0;
  for (int i = 0; i < (int)s.size(); i++)
    if (a[s[best]].size() > a[s[i]].size()) best = i;
  int v = s[best];
  if ((int)a[v].size() + 2 > (int)t.size()) return false;
  memset(u, 0, sizeof(u));
  for (int i = 0; i < (int)a[v].size(); i++) u[a[v][i]] = 1;
  int cnt = 1, ctr = 0;
  ans[v] = 1;
  for (int i = 0; i < (int)t.size() && ctr < 2; i++)
    if (!u[t[i]]) ans[t[i]] = 1, ++ctr;
  ++cnt;
  ctr = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (!ans[s[i]]) {
      ans[s[i]] = cnt;
      if (++ctr == 3) {
        ++cnt;
        ctr = 0;
      }
    }
  }
  for (int i = 0; i < (int)t.size(); i++) {
    if (!ans[t[i]]) {
      ans[t[i]] = cnt;
      if (++ctr == 3) {
        ++cnt;
        ctr = 0;
      }
    }
  }
  return true;
}
bool cmp(int x, int y) { return a[x].size() < a[y].size(); }
bool case2(vector<int> &s, vector<int> &t) {
  sort(t.begin(), t.end(), cmp);
  if (t.size() < 2 || s.size() < 4) return false;
  if ((int)a[t[1]].size() + 2 > (int)s.size()) return false;
  int cnt = 1, ctr = 0;
  memset(u, 0, sizeof(u));
  ans[t[0]] = 1;
  for (int i = 0; i < (int)a[t[0]].size(); i++) u[a[t[0]][i]] = 1;
  for (int i = 0; i < (int)s.size() && ctr < 2; i++)
    if (!u[s[i]]) {
      ++ctr;
      ans[s[i]] = 1;
    }
  ctr = 0;
  cnt = 2;
  memset(u, 0, sizeof(u));
  ans[t[1]] = 2;
  for (int i = 0; i < (int)a[t[1]].size(); i++) u[a[t[1]][i]] = 1;
  for (int i = 0; i < (int)s.size() && ctr < 2; i++)
    if (!u[s[i]]) {
      ++ctr;
      ans[s[i]] = 2;
    }
  ++cnt;
  ctr = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (!ans[s[i]]) {
      ans[s[i]] = cnt;
      if (++ctr == 3) {
        ++cnt;
        ctr = 0;
      }
    }
  }
  for (int i = 0; i < (int)t.size(); i++) {
    if (!ans[t[i]]) {
      ans[t[i]] = cnt;
      if (++ctr == 3) {
        ++cnt;
        ctr = 0;
      }
    }
  }
  return true;
}
int main(void) {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (int i = 1; i <= n; i++)
    if (!u[i]) dfs(i, 0);
  int w[2] = {};
  vector<int> s[2];
  for (int i = 1; i <= n; i++) {
    w[g[i]]++;
    s[g[i]].push_back(i);
  }
  if (w[0] % 3 == 0 && w[1] % 3 == 0) {
    int cnt = 0;
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < (int)s[i].size(); j += 3) {
        ++cnt;
        ans[s[i][j]] = ans[s[i][j + 1]] = ans[s[i][j + 2]] = cnt;
      }
    OUTPUT_YES();
  } else {
    if (case1((w[0] % 3 == 1 ? s[0] : s[1]), (w[0] % 3 == 2 ? s[0] : s[1])))
      OUTPUT_YES();
    else if (case2((w[0] % 3 == 1 ? s[0] : s[1]),
                   (w[0] % 3 == 2 ? s[0] : s[1])))
      OUTPUT_YES();
    else
      OUTPUT_NO();
  }
  return 0;
}