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;
vector<vector<int>> adj;
vector<int> max_depth, depth, color;
void dfs_depth(int current_v, int parent_v) {
  if (current_v == parent_v) depth[current_v] = -1;
  depth[current_v] = depth[parent_v] + 1;
  max_depth[current_v] = depth[current_v];
  for (auto child_v : adj[current_v]) {
    if (child_v == parent_v) continue;
    dfs_depth(child_v, current_v);
    max_depth[current_v] = max(max_depth[current_v], max_depth[child_v]);
  }
}
vector<int> get_diameter_path(int n) {
  dfs_depth(1, 1);
  int max_d = 0, leaf_of_interest = 0;
  for (int i = 1; i <= n; ++i) {
    if (depth[i] > max_d) {
      max_d = depth[i];
      leaf_of_interest = i;
    }
  }
  dfs_depth(leaf_of_interest, leaf_of_interest);
  int current_v = leaf_of_interest, parent_v = leaf_of_interest;
  vector<int> diameter_path;
  bool has_next_v = true;
  while (has_next_v) {
    diameter_path.push_back(current_v);
    has_next_v = false;
    int next_v = 0, max_d = 0;
    for (auto child_v : adj[current_v]) {
      if (child_v == parent_v) continue;
      has_next_v = true;
      if (max_depth[child_v] > max_d) {
        next_v = child_v;
        max_d = max_depth[child_v];
      }
    }
    parent_v = current_v;
    current_v = next_v;
  }
  return diameter_path;
}
pair<int, int> get_max_2ndmax(int root_v, int n, bool unique = false) {
  dfs_depth(root_v, root_v);
  int max_d = 0, second_max_d = 0;
  for (int i = 1; i <= n; ++i) {
    if (max_depth[i] > max_d) {
      second_max_d = max_d;
      max_d = max_depth[i];
    } else if (max_depth[i] == max_d) {
      if (!unique) {
        second_max_d = max_d;
        max_d = max_depth[i];
      }
    } else if (max_depth[i] > second_max_d) {
      second_max_d = max_depth[i];
    }
  }
  return make_pair(max_d, second_max_d);
}
bool dfs2(int current_v, int parent_v, int max_d_up, int k) {
  multiset<int> temp;
  for (auto child_v : adj[current_v]) {
    if (child_v == parent_v) continue;
    temp.insert(max_depth[child_v] - depth[current_v]);
  }
  if (max_d_up) temp.insert(max_d_up);
  if (temp.size() >= 3) {
    auto it2 = temp.end();
    auto it3 = it2;
    --it2;
    --it2;
    --it3;
    --it3;
    --it3;
    if (*it2 + *it3 >= k - 1) return false;
  }
  for (auto child_v : adj[current_v]) {
    if (child_v == parent_v || temp.empty()) continue;
    auto it = temp.find(max_depth[child_v] - depth[current_v]);
    temp.erase(it);
    int child_max_d_up = 0;
    if (!temp.empty()) {
      it = temp.end();
      --it;
      child_max_d_up = *it;
    }
    if (!dfs2(child_v, current_v, child_max_d_up + 1, k)) return false;
    temp.insert(max_depth[child_v] - depth[current_v]);
  }
  return true;
}
bool possible(int n, int k) {
  dfs_depth(1, 1);
  return dfs2(1, 1, 0, k);
}
void dfs_color(int current_v, int parent_v, int change, int k) {
  if (current_v != parent_v) {
    color[current_v] = color[parent_v] + change;
  }
  if (color[current_v] > k) color[current_v] = 1;
  if (!color[current_v]) color[current_v] = k;
  for (auto child_v : adj[current_v]) {
    if (!color[child_v]) dfs_color(child_v, current_v, change, k);
  }
}
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  adj = vector<vector<int>>(n + 1, vector<int>());
  max_depth = vector<int>(n + 1, 0);
  depth = vector<int>(n + 1, 0);
  color = vector<int>(n + 1, 0);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (k == 2) {
    color[1] = 1;
    dfs_color(1, 1, 1, k);
    printf("Yes\n");
    for (int i = 1; i <= n; ++i) printf("%d ", color[i]);
    printf("\n");
    return 0;
  }
  if (!possible(n, k)) {
    printf("No\n");
    return 0;
  }
  vector<int> diameter_path = get_diameter_path(n);
  int diameter = diameter_path.size();
  int central_v = diameter_path[diameter / 2];
  pair<int, int> res = get_max_2ndmax(central_v, n);
  int max_d = res.first, second_max_d = res.second;
  vector<int> child_set1, child_set2;
  for (auto child_v : adj[central_v]) {
    if (max_depth[child_v] == max_d) {
      child_set1.push_back(child_v);
    } else if (max_depth[child_v] == second_max_d) {
      child_set2.push_back(child_v);
    }
  }
  if (max_d == second_max_d) {
    child_set2.push_back(child_set1.back());
    child_set1.pop_back();
  }
  color[central_v] = 1;
  for (auto v : child_set1) {
    dfs_color(v, central_v, 1, k);
  }
  for (auto v : child_set2) {
    dfs_color(v, central_v, -1, k);
  }
  dfs_color(central_v, central_v, 1, k);
  printf("Yes\n");
  for (int i = 1; i <= n; ++i) printf("%d ", color[i]);
  printf("\n");
  return 0;
}