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 = 1e5 + 29;
vector<int> adj[MAX];
int n, m;
int color[MAX], ans[MAX];
void dfs(int v, int c) {
  color[v] = c;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (color[u] == -1) {
      dfs(u, c ^ 1);
    }
  }
}
vector<int> part[2], iso;
int f[MAX];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a].push_back(b), adj[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) color[i] = -1;
  for (int i = 1; i <= n; i++) {
    if (color[i] == -1 && adj[i].size()) {
      dfs(i, 0);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (color[i] == -1)
      iso.push_back(i);
    else
      part[color[i]].push_back(i);
  }
  if (iso.size() >= 2) {
    while (iso.size() > 2) {
      part[0].push_back(iso[(int)iso.size() - 1]);
      iso.pop_back();
    }
    int y1 = part[0].size() % 3, y2 = part[1].size() % 3;
    if (y1 > y2) {
      swap(y1, y2), swap(part[0], part[1]);
    }
    if (y1 == 0) {
      ans[part[1][0]] = 1, ans[iso[0]] = ans[iso[1]] = 1;
      int b = 2;
      for (int i = 0; i < part[0].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
        b++;
      }
      for (int i = 1; i < part[1].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
        b++;
      }
      printf("YES\n");
      for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
      printf("\n");
    } else {
      part[0].push_back(iso[0]), part[1].push_back(iso[1]);
      int b = 1;
      for (int i = 0; i < part[0].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
        b++;
      }
      for (int i = 0; i < part[1].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
        b++;
      }
      printf("YES\n");
      for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
      printf("\n");
    }
  } else if (iso.size() == 1) {
    int y1 = part[0].size() % 3, y2 = part[1].size() % 3;
    if (y1 > y2) {
      swap(y1, y2), swap(part[0], part[1]);
    }
    if (y1 == 0) {
      ans[iso[0]] = 1, ans[part[1][0]] = 1, ans[part[1][1]] = 1;
      int b = 2;
      for (int i = 0; i < part[0].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
        b++;
      }
      for (int i = 2; i < part[1].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
        b++;
      }
      printf("YES\n");
      for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
      printf("\n");
    } else {
      bool clique = 1;
      int v, u;
      for (int i = 0; i < part[0].size(); i++) {
        if (adj[part[0][i]].size() < part[1].size()) {
          clique = 0;
          v = part[0][i];
          part[0].erase(part[0].begin() + i);
          break;
        }
      }
      if (clique)
        printf("NO\n");
      else {
        unordered_set<int> tmp;
        for (int i = 0; i < adj[v].size(); i++) tmp.insert(adj[v][i]);
        for (int i = 0; i < part[1].size(); i++) {
          if (tmp.find(part[1][i]) == tmp.end()) {
            u = part[1][i];
            part[1].erase(part[1].begin() + i);
            break;
          }
        }
        ans[iso[0]] = 1, ans[u] = ans[v] = 1;
        int b = 2;
        for (int i = 0; i < part[0].size(); i += 3) {
          for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
          b++;
        }
        for (int i = 0; i < part[1].size(); i += 3) {
          for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
          b++;
        }
        printf("YES\n");
        for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
        printf("\n");
      }
    }
  } else {
    int y1 = part[0].size() % 3, y2 = part[1].size() % 3;
    if (y1 > y2) {
      swap(y1, y2), swap(part[0], part[1]);
    }
    if (y1 == 0) {
      int b = 1;
      for (int i = 0; i < part[0].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
        b++;
      }
      for (int i = 0; i < part[1].size(); i += 3) {
        for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
        b++;
      }
      printf("YES\n");
      for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
      printf("\n");
    } else {
      int q2 = 0;
      int v;
      vector<int> us;
      for (int i = 0; i < part[0].size(); i++) {
        if (adj[part[0][i]].size() + 2 <= part[1].size()) {
          q2 = 1;
          v = part[0][i];
          part[0].erase(part[0].begin() + i);
          break;
        }
      }
      if (q2) {
        unordered_set<int> tmp;
        for (int i = 0; i < adj[v].size(); i++) tmp.insert(adj[v][i]);
        for (int i = 0; i < part[1].size(); i++) {
          if (us.size() == 2) break;
          if (tmp.find(part[1][i]) == tmp.end()) {
            us.push_back(part[1][i]);
          }
        }
        part[1].erase(find(part[1].begin(), part[1].end(), us[0]));
        part[1].erase(find(part[1].begin(), part[1].end(), us[1]));
        ans[v] = ans[us[0]] = ans[us[1]] = 1;
        int b = 2;
        for (int i = 0; i < part[0].size(); i += 3) {
          for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
          b++;
        }
        for (int i = 0; i < part[1].size(); i += 3) {
          for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
          b++;
        }
        printf("YES\n");
        for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
        printf("\n");
      } else {
        unordered_map<int, vector<int> > mm;
        for (int i = 0; i < part[0].size(); i++) {
          unordered_set<int> s;
          int v = part[0][i];
          for (int j = 0; j < adj[v].size(); j++) s.insert(adj[v][j]);
          int q = -1;
          for (int j = 0; j < part[1].size(); j++) {
            if (s.find(part[1][j]) == s.end()) {
              q = part[1][j];
              break;
            }
          }
          if (q != -1) mm[q].push_back(v);
        }
        vector<int> tmp;
        for (auto &ele : mm) {
          auto &ve = ele.second;
          if (ve.size() >= 2) tmp.push_back(ele.first);
        }
        if (tmp.size() < 2)
          printf("NO\n");
        else {
          for (int i = 0; i < 2; i++) {
            int q = tmp[i];
            ans[q] = i + 1, ans[mm[q][0]] = i + 1, ans[mm[q][1]] = i + 1;
            part[1].erase(find(part[1].begin(), part[1].end(), q));
            part[0].erase(find(part[0].begin(), part[0].end(), mm[q][0]));
            part[0].erase(find(part[0].begin(), part[0].end(), mm[q][1]));
          }
          int b = 3;
          for (int i = 0; i < part[0].size(); i += 3) {
            for (int j = 0; j < 3; j++) ans[part[0][i + j]] = b;
            b++;
          }
          for (int i = 0; i < part[1].size(); i += 3) {
            for (int j = 0; j < 3; j++) ans[part[1][i + j]] = b;
            b++;
          }
          printf("YES\n");
          for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
          printf("\n");
        }
      }
    }
  }
  return 0;
}