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 long long mod = 1000000007;
const long long INF = mod * mod;
const long double eps = 1e-5;
const long double pi = acos(-1.0);
int n, k;
vector<int> G[1 << 18];
vector<int> dist;
int hantai(int s) {
  dist.clear();
  dist.resize(n, mod);
  dist[s] = 0;
  queue<int> q;
  q.push(s);
  int res;
  while (!q.empty()) {
    int id = q.front();
    q.pop();
    for (int j = 0; j < G[id].size(); j++) {
      int to = G[id][j];
      if (dist[id] + 1 < dist[to]) {
        dist[to] = dist[id] + 1;
        q.push(to);
      }
    }
    res = id;
  }
  return res;
}
int depth(int id, int fr) {
  int res = 0;
  for (int j = 0; j < G[id].size(); j++) {
    int to = G[id][j];
    if (to == fr) continue;
    res = max(res, depth(to, id));
  }
  return res + 1;
}
vector<int> ans(n);
void tocol(int id, int fr, int col, bool inc) {
  if (inc)
    col++;
  else
    col--;
  col = (col % k + k) % k;
  ans[id] = col;
  for (int j = 0; j < G[id].size(); j++) {
    int to = G[id][j];
    if (to == fr) continue;
    tocol(to, id, col, inc);
  }
}
void solve() {
  cin >> n >> k;
  ans.resize(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  if (k == 2) {
    cout << "Yes" << endl;
    queue<int> q;
    q.push(0);
    vector<bool> used(n, false);
    used[0] = true;
    while (!q.empty()) {
      int id = q.front();
      q.pop();
      for (int j = 0; j < G[id].size(); j++) {
        int to = G[id][j];
        if (used[to]) continue;
        ans[to] = ans[id] ^ 1;
        used[to] = true;
        q.push(to);
      }
    }
    for (int i = 0; i < n; i++) {
      if (i > 0) cout << " ";
      cout << ans[i] + 1;
    }
    cout << endl;
    return;
  }
  int l = hantai(0);
  int r = hantai(l);
  int ma = dist[r];
  vector<int> ldist = dist;
  hantai(r);
  vector<int> &rdist = dist;
  int cur = l;
  vector<int> pathes;
  vector<bool> inpathes(n, false);
  while (cur != r) {
    inpathes[cur] = true;
    pathes.push_back(cur);
    for (int j = 0; j < G[cur].size(); j++) {
      int to = G[cur][j];
      if (inpathes[to]) continue;
      if (ma == ldist[to] + rdist[to]) {
        cur = to;
        break;
      }
    }
  }
  inpathes[r] = true;
  pathes.push_back(r);
  if (pathes.size() < k) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) {
      if (i > 0) cout << " ";
      cout << (i % k) + 1;
    }
    cout << endl;
    return;
  }
  for (int i = 0; i < pathes.size(); i++) {
    int col = i % k;
    int id = pathes[i];
    ans[id] = col;
    int dl = ldist[id], dr = rdist[id];
    int mal = 0;
    vector<int> szs;
    for (int j = 0; j < G[id].size(); j++) {
      int to = G[id][j];
      if (inpathes[to]) continue;
      int sz = depth(to, id);
      szs.push_back(sz);
    }
    sort(szs.begin(), szs.end(), greater<int>());
    if (szs.size() >= 2) {
      if (szs[0] + szs[1] + 1 >= k) {
        cout << "No" << endl;
        return;
      }
    }
    for (int j = 0; j < G[id].size(); j++) {
      int to = G[id][j];
      if (inpathes[to]) continue;
      int sz = depth(to, id);
      if (sz + dl + 1 >= k && sz + dr + 1 >= k) {
        cout << "No" << endl;
        return;
      }
      if (sz + dl + 1 >= k) {
        tocol(to, id, i % k, true);
      } else {
        tocol(to, id, i % k, false);
      }
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) {
    if (i > 0) cout << " ";
    cout << ans[i] + 1;
  }
  cout << endl;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}