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> s[100010];
bool k[100010];
bool odw[100010];
bool gut[100010][2];
bool som[100010];
void DFS(int x) {
  odw[x] = true;
  for (auto v : s[x]) {
    if (!odw[v]) {
      k[v] = !k[x];
      DFS(v);
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, a, b, ilea, ileb, xd, xd2, wiel1, wiel0, i, j;
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    cin >> a >> b;
    s[a].push_back(b);
    s[b].push_back(a);
  }
  wiel1 = 0;
  wiel0 = 0;
  for (i = 1; i <= n; i++) {
    if (!odw[i]) {
      k[i] = true;
      DFS(i);
    }
    if (k[i])
      wiel1++;
    else
      wiel0++;
  }
  if (wiel1 % 3 == 0) {
    cout << "YES\n";
    a = 0;
    b = 0;
    xd = 1;
    ilea = 3;
    ileb = 3;
    for (i = 1; i <= n; i++) {
      if (k[i]) {
        if (ilea == 3) {
          ilea = 0;
          a = xd;
          xd++;
        }
        cout << a << " ";
        ilea++;
      } else {
        if (ileb == 3) {
          ileb = 0;
          b = xd;
          xd++;
        }
        cout << b << " ";
        ileb++;
      }
    }
    return 0;
  } else if (wiel1 % 3 == 1) {
    for (i = 1; i <= n; i++) {
      if ((!k[i]) || ((int)s[i].size() >= wiel0 - 1)) continue;
      cout << "YES\n";
      gut[i][0] = true;
      xd = 2;
      for (auto v : s[i]) som[v] = true;
      for (j = 1; j <= n; j++) {
        if ((!som[j]) && (!k[j])) {
          gut[j][0] = true;
          xd--;
          if (xd == 0) break;
        }
      }
      a = 0;
      b = 0;
      xd = 2;
      ilea = 3;
      ileb = 3;
      for (j = 1; j <= n; j++) {
        if (gut[j][0])
          cout << "1 ";
        else if (k[j]) {
          if (ilea == 3) {
            ilea = 0;
            a = xd;
            xd++;
          }
          cout << a << " ";
          ilea++;
        } else {
          if (ileb == 3) {
            ileb = 0;
            b = xd;
            xd++;
          }
          cout << b << " ";
          ileb++;
        }
      }
      return 0;
    }
    xd2 = 2;
    for (i = 1; i <= n; i++) {
      if ((k[i]) || ((int)s[i].size() >= wiel1 - 1)) continue;
      xd2--;
      gut[i][xd2] = true;
      xd = 2;
      for (auto v : s[i]) som[v] = true;
      for (j = 1; j <= n; j++) {
        if ((!som[j]) && (k[j])) {
          gut[j][xd2] = true;
          xd--;
          if (xd == 0) break;
        }
      }
      for (auto v : s[i]) som[v] = false;
      if (xd2 > 0) continue;
      cout << "YES\n";
      a = 0;
      b = 0;
      xd = 3;
      ilea = 3;
      ileb = 3;
      for (j = 1; j <= n; j++) {
        if (gut[j][0])
          cout << "1 ";
        else if (gut[j][1])
          cout << "2 ";
        else if (k[j]) {
          if (ilea == 3) {
            ilea = 0;
            a = xd;
            xd++;
          }
          cout << a << " ";
          ilea++;
        } else {
          if (ileb == 3) {
            ileb = 0;
            b = xd;
            xd++;
          }
          cout << b << " ";
          ileb++;
        }
      }
      return 0;
    }
    cout << "NO";
    return 0;
  } else {
    for (i = 1; i <= n; i++) {
      if ((k[i]) || ((int)s[i].size() >= wiel1 - 1)) continue;
      cout << "YES\n";
      gut[i][0] = true;
      xd = 2;
      for (auto v : s[i]) som[v] = true;
      for (j = 1; j <= n; j++) {
        if ((!som[j]) && (k[j])) {
          gut[j][0] = true;
          xd--;
          if (xd == 0) break;
        }
      }
      a = 0;
      b = 0;
      xd = 2;
      ilea = 3;
      ileb = 3;
      for (j = 1; j <= n; j++) {
        if (gut[j][0])
          cout << "1 ";
        else if (k[j]) {
          if (ilea == 3) {
            ilea = 0;
            a = xd;
            xd++;
          }
          cout << a << " ";
          ilea++;
        } else {
          if (ileb == 3) {
            ileb = 0;
            b = xd;
            xd++;
          }
          cout << b << " ";
          ileb++;
        }
      }
      return 0;
    }
    xd2 = 2;
    for (i = 1; i <= n; i++) {
      if ((!k[i]) || ((int)s[i].size() >= wiel0 - 1)) continue;
      xd2--;
      gut[i][xd2] = true;
      xd = 2;
      for (auto v : s[i]) som[v] = true;
      for (j = 1; j <= n; j++) {
        if ((!som[j]) && (!k[j])) {
          gut[j][xd2] = true;
          xd--;
          if (xd == 0) break;
        }
      }
      for (auto v : s[i]) som[v] = false;
      if (xd2 > 0) continue;
      cout << "YES\n";
      a = 0;
      b = 0;
      xd = 3;
      ilea = 3;
      ileb = 3;
      for (j = 1; j <= n; j++) {
        if (gut[j][0])
          cout << "1 ";
        else if (gut[j][1])
          cout << "2 ";
        else if (k[j]) {
          if (ilea == 3) {
            ilea = 0;
            a = xd;
            xd++;
          }
          cout << a << " ";
          ilea++;
        } else {
          if (ileb == 3) {
            ileb = 0;
            b = xd;
            xd++;
          }
          cout << b << " ";
          ileb++;
        }
      }
      return 0;
    }
    cout << "NO";
    return 0;
  }
  return 0;
}