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;
struct fast_ios {
  fast_ios() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} fast_ios_;
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &x : v) is >> x;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i != v.size() - 1) cout << endl;
  };
  return os;
}
template <typename T>
void Out(T x) {
  cout << x << endl;
}
template <typename T1, typename T2>
void Ans(bool first, T1 y, T2 n) {
  if (first)
    Out(y);
  else
    Out(n);
}
using vec = vector<long long>;
using mat = vector<vec>;
using Pii = pair<long long, long long>;
using PiP = pair<long long, Pii>;
using PPi = pair<Pii, long long>;
using bools = vector<bool>;
using pairs = vector<Pii>;
const long long mod = 1000000007;
struct edge {
  long long to, cost, id;
};
class Graph {
 public:
  long long N;
  vector<vector<edge>> G;
  vec ans;
  Graph(long long N) : N(N) {
    G = vector<vector<edge>>(N, vector<edge>(0));
    ans = vec(N, -1);
  }
  void add_Directed_edge(long long from, long long to, long long cost = 1,
                         long long id = 0) {
    G[from].push_back(edge({to, cost, id}));
  }
  void add_Undirected_edge(long long v1, long long v2, long long cost = 1,
                           long long id = 0) {
    add_Directed_edge(v1, v2, cost, id);
    add_Directed_edge(v2, v1, cost, id);
  }
  void dfs_for_calcdist(long long v, long long p, long long c, vec &dist) {
    if (p != -1) dist[v] = dist[p] + c;
    for (auto e : G[v])
      if (e.to != p) dfs_for_calcdist(e.to, v, e.cost, dist);
  }
  long long diameter(long long &v1, long long &v2, long long second = 0) {
    vec dist(N, 0);
    dfs_for_calcdist(second, -1, -1, dist);
    v1 = distance(dist.begin(), max_element(dist.begin(), dist.end()));
    fill(dist.begin(), dist.end(), 0);
    dfs_for_calcdist(v1, -1, -1, dist);
    auto amax = max_element(dist.begin(), dist.end());
    v2 = distance(dist.begin(), amax);
    return *amax;
  }
  void dfs_for_k2(long long v, long long p = -1) {
    if (p == -1)
      ans[v] = 0;
    else
      ans[v] = 1 - ans[p];
    for (auto e : G[v])
      if (e.to != p) dfs_for_k2(e.to, v);
  }
  void showans() {
    Out("Yes");
    for (long long i = (0); i < (N); i++) cout << ans[i] + 1 << ' ';
    cout << endl;
  }
};
signed main() {
  long long n, k;
  cin >> n >> k;
  Graph G(n);
  for (long long i = (0); i < (n - 1); i++) {
    long long a, b;
    cin >> a >> b;
    G.add_Undirected_edge(a - 1, b - 1, 1);
  }
  if (k == 2) {
    G.dfs_for_k2(0);
    G.showans();
    return 0;
  }
  long long second, t;
  long long R = G.diameter(second, t, 0);
  if (R + 1 < k) {
    Out("Yes");
    for (long long i = (0); i < (n); i++) cout << i % k + 1 << ' ';
    cout << endl;
    return 0;
  }
  vec dist_s(n, 0), dist_t(n, 0);
  G.dfs_for_calcdist(second, -1, -1, dist_s);
  G.dfs_for_calcdist(t, -1, -1, dist_t);
  long long now = second;
  long long c = 0;
  while (true) {
    G.ans[now] = c;
    c = (c + 1) % k;
    if (now == t) break;
    for (auto e : G.G[now])
      if (dist_t[e.to] == dist_t[now] - 1) {
        now = e.to;
        break;
      }
  }
  for (long long i = (0); i < (n); i++)
    if (G.ans[i] == -1) {
      long long dt = dist_t[i], ds = dist_s[i];
      if (dt >= k - 1 && ds >= k - 1) {
        Out("No");
        return 0;
      }
      if (ds >= dt)
        G.ans[i] = ds % k;
      else
        G.ans[i] = ((G.ans[t] - dt) % k + k) % k;
    }
  G.showans();
  return 0;
}