Problem: The new pedestrian zone in Moscow city center consists of n squares connected with each other by n - 1 footpaths. We define a simple path as a sequence of squares such that no square appears in this sequence twice and any two adjacent squares in this sequence are directly connected with a footpath. The size of a simple path is the number of squares in it. The footpaths are designed in a such a way that there is exactly one simple path between any pair of different squares.

During preparations for Moscow City Day the city council decided to renew ground tiles on all n squares. There are k tile types of different colors, numbered from 1 to k. For each square exactly one tile type must be selected and then used to cover this square surface. To make walking through the city center more fascinating, it was decided to select tiles types for each square in such a way that any possible simple path of size exactly k contains squares with all k possible tile colors.

You need to find out whether it is possible to place the tiles this way or not.

Input

The first line contains two integers n, k (2 ≤ k ≤ n ≤ 200 000) — the number of squares in the new pedestrian zone, the number of different tile colors.

Each of the following n - 1 lines contains two integers v_i and u_i (1 ≤ v_i, u_i ≤ n) — numbers of the squares connected by the corresponding road.

It's guaranteed, that it's possible to go from any square to any other square, moreover there is exactly one such simple path.

Output

Print "Yes" if it is possible to assign tile colors this way and "No" otherwise.

In case your answer is "Yes", print n integers from 1 to k each, the color of the tile for every square.

Examples

Input


7 4
1 3
2 3
3 4
4 5
5 6
5 7


Output


Yes
1 1 2 3 4 1 1


Input


7 3
1 3
2 3
3 4
4 5
5 6
5 7


Output


No

Note

The following pictures illustrate the pedestrian zone in first and second examples. The second picture also shows one possible distribution of colors among the squares for k = 4.

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5 + 10;
vector<int> adj[maxN];
int n, k, a[maxN], h[maxN], parent[maxN], dp_down[maxN], dp_up[maxN];
bool vis[maxN];
vector<int> vc;
void last_dfs(int v, int par = -1) {
  vc.push_back(v);
  for (auto u : adj[v]) {
    if (u == par) continue;
    h[u] = h[v] + 1;
    last_dfs(u, v);
  }
}
void dfs_down(int v, int par = -1) {
  for (auto u : adj[v]) {
    if (u == par) continue;
    dfs_down(u, v);
    dp_down[v] = max(dp_down[v], dp_down[u] + 1);
  }
}
void dfs_up(int v, int par = -1) {
  int mx1 = 1 + dp_up[v], mx2 = 0;
  for (auto u : adj[v]) {
    if (u == par) continue;
    if (dp_down[u] + 2 > mx1)
      mx2 = mx1, mx1 = dp_down[u] + 2;
    else if (dp_down[u] + 2 > mx2)
      mx2 = dp_down[u] + 2;
  }
  for (auto u : adj[v]) {
    if (u == par) continue;
    if (2 + dp_down[u] == mx1)
      dp_up[u] = mx2;
    else
      dp_up[u] = mx1;
  }
  for (auto u : adj[v]) {
    if (u == par) continue;
    dfs_up(u, v);
  }
  mx1 = dp_up[v], mx2 = -1e9;
  int mx3 = -1e9;
  for (auto u : adj[v]) {
    if (u == par) continue;
    if (dp_down[u] + 1 > mx1)
      mx3 = mx2, mx2 = mx1, mx1 = dp_down[u] + 1;
    else if (dp_down[u] + 1 > mx2)
      mx3 = mx2, mx2 = dp_down[u] + 1;
    else if (dp_down[u] + 1 > mx3)
      mx3 = dp_down[u] + 1;
  }
  if (mx2 + mx3 >= k - 1) {
    cout << "No\n";
    exit(0);
  }
}
void DFS(int v, int par = -1) {
  parent[v] = par;
  for (auto u : adj[v]) {
    if (u == par) continue;
    h[u] = h[v] + 1;
    DFS(u, v);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[v].push_back(u);
    adj[u].push_back(v);
  }
  memset(h, 0, sizeof h);
  DFS(0);
  if (k <= 2) {
    cout << "Yes\n";
    for (int i = 0; i < n; i++) cout << (h[i] % 2) + 1 << ' ';
    cout << '\n';
    return 0;
  }
  int v1 = 0;
  for (int i = 0; i < n; i++)
    if (h[i] > h[v1]) v1 = i;
  memset(h, 0, sizeof h);
  DFS(v1);
  int v2 = 0;
  for (int i = 0; i < n; i++)
    if (h[i] > h[v2]) v2 = i;
  if (h[v2] + 1 < k) {
    cout << "Yes\n";
    for (int i = 0; i < n; i++) cout << 1 << ' ';
    cout << '\n';
    return 0;
  }
  vector<int> path;
  int curr = v2;
  while (true) {
    path.push_back(curr);
    if (curr == v1) break;
    curr = parent[curr];
  }
  memset(h, 0, sizeof h);
  int t = 0, len = path.size() - 1, l_len = 0;
  for (auto v : path) {
    vis[v] = true;
    a[v] = t % k;
    t++;
  }
  for (auto v : path) {
    for (auto u : adj[v]) {
      if (vis[u]) continue;
      vc.clear();
      h[u] = 0;
      last_dfs(u, v);
      int p = u;
      for (auto x : vc)
        if (h[x] > h[p]) p = x;
      int tool = h[p] + 1;
      if (tool + l_len >= k - 1 && tool + len - l_len >= k - 1)
        return cout << "No\n", 0;
      if (tool + l_len >= k - 1) {
        for (auto x : vc) a[x] = (l_len + h[x] + 1) % k;
      } else {
        for (auto x : vc) a[x] = (l_len - h[x] % k - 1 + 2 * k) % k;
      }
    }
    l_len++;
  }
  cout << "Yes\n";
  for (int i = 0; i < n; i++) cout << a[i] + 1 << ' ';
  cout << endl;
}