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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline int rand(int x, int y) {
  ++y;
  return (rng() % (y - x)) + x;
}
string to_string(char c) {
  string second(1, c);
  return second;
}
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void degug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void degug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  degug_out(T...);
}
inline int gcd(int a, int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
int n, k, ans[(200006)], up[(200006)];
pair<int, int> dp[(200006)][3];
vector<int> v[(200006)];
void put(pair<int, int> *A, pair<int, int> x) {
  A[2] = max(A[2], x);
  if (A[2] > A[1]) swap(A[1], A[2]);
  if (A[1] > A[0]) swap(A[0], A[1]);
}
void dfs(int x, int p) {
  for (auto i : v[x])
    if (i ^ p) {
      dfs(i, x);
      put(dp[x], pair<int, int>(dp[i][0].first + 1, i));
    }
}
bool bad(int a, int b, int c) {
  if (a == 0 || b == 0 || c == 0) return 0;
  return (a + b) >= k - 1 && (a + c) >= k - 1 && (b + c) >= k - 1;
}
bool bad(int a, int b, int c, int d) {
  vector<int> v;
  v.emplace_back(a), v.emplace_back(b), v.emplace_back(c), v.emplace_back(d);
  sort((v).begin(), (v).end(), greater<int>());
  return bad(v[0], v[1], v[2]);
}
void dfs2(int x, int p) {
  if (bad(dp[x][0].first, dp[x][1].first, dp[x][2].first, up[x])) {
    cout << "No\n";
    exit(0);
  }
  for (auto i : v[x])
    if (i ^ p) {
      int mx = dp[x][0].first;
      if (dp[x][0].second == i) mx = dp[x][1].first;
      up[i] = max(up[x] + 1, mx + 1);
      dfs2(i, x);
    }
}
struct diam {
  int dist[(200006)];
  int p[(200006)];
  stack<int> stk;
  void solve(int x, int p) {
    assert(stk.size());
    ans[x] = stk.top();
    stk.pop();
    for (auto i : v[x])
      if (i ^ p) {
        solve(i, x);
      }
    stk.emplace(ans[x]);
  }
  void main() {
    while (stk.size()) stk.pop();
    dist[1] = 0;
    dfs(1, 1);
    pair<int, int> root = pair<int, int>(1, 1);
    for (int i = (2); i <= (int)(n); ++i)
      if (dist[i] > dist[root.first]) root.first = i;
    dist[root.first] = 0;
    dfs(root.first, root.first);
    for (int i = (2); i <= (int)(n); ++i)
      if (dist[i] > dist[root.second]) root.second = i;
    assert(root.first ^ root.second);
    int x = root.second;
    vector<int> path;
    while (x ^ root.first) {
      path.emplace_back(x);
      x = p[x];
    }
    path.emplace_back(root.first);
    if (path.size() < k) case2();
    reverse((path).begin(), (path).end());
    int co = 0;
    for (auto i : path) ans[i] = co % k, ++co;
    stk.emplace(ans[path[0]]);
    for (int i = (1); i <= (int)(((int)path.size()) / 2 - 1); ++i) {
      for (auto j : v[path[i]])
        if (j != path[i - 1] && j != path[i + 1]) solve(j, path[i]);
      stk.emplace(ans[path[i]]);
    }
    while (stk.size()) stk.pop();
    stk.emplace(ans[path.back()]);
    for (int i = (((int)path.size()) - 2); i >= (int)(((int)path.size()) / 2);
         --i) {
      for (auto j : v[path[i]])
        if (j != path[i - 1] && j != path[i + 1]) solve(j, path[i]);
      stk.emplace(ans[path[i]]);
    }
  }
  void dfs(int x, int par) {
    p[x] = par;
    for (auto i : v[x])
      if (i ^ par) dist[i] = dist[x] + 1, dfs(i, x);
  }
  void case2() {
    cout << "YES\n";
    for (int i = (1); i <= (int)(n); ++i) cout << 1 << ' ';
    exit(0);
  }
} d;
void dfsw(int x, int p) {
  for (auto i : v[x])
    if (i ^ p) {
      ans[i] = !ans[x];
      dfsw(i, x);
    }
}
void weird() {
  ans[1] = 0;
  dfsw(1, 1);
  cout << "YES\n";
  for (int i = (1); i <= (int)(n); ++i) cout << ans[i] + 1 << ' ';
  exit(0);
}
int main() {
  memset((ans), -1, sizeof((ans)));
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (int i = (0); i <= (int)(n - 2); ++i) {
    int a, b;
    cin >> a >> b;
    v[a].emplace_back(b), v[b].emplace_back(a);
  }
  if (k == 2) weird();
  dfs(1, 1);
  dfs2(1, 1);
  d.main();
  cout << "YES\n";
  for (int i = (1); i <= (int)(n); ++i)
    assert(~ans[i]), cout << ans[i] + 1 << ' ';
}