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;
void Max(int &x, int y) { x = max(x, y); }
void Min(int &x, int y) { x = min(x, y); }
const int N = 2e5 + 5;
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
  return os << '(' << a.first << ", " << a.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (unsigned int i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const deque<T> &a) {
  os << '[';
  for (unsigned int i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const set<T> &a) {
  os << '{';
  for (typename set<T>::iterator it = a.begin(); it != a.end(); it++) {
    typename set<T>::iterator jt = it;
    os << *it << (++jt != a.end() ? ", " : "");
  }
  os << '}';
  return os;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, map<T1, T2> &a) {
  os << "{\n";
  for (typename map<T1, T2>::iterator it = a.begin(); it != a.end(); it++) {
    typename map<T1, T2>::iterator jt = it;
    os << "  " << it->first << ": " << it->second
       << (++jt != a.end() ? ",\n" : "\n");
  }
  os << '}';
  return os;
}
int n, length;
vector<vector<int> > a(N);
int par[N];
int maxDepth[N];
void dfs(int u, int p, int depth, pair<int, int> &farthest) {
  par[u] = p;
  farthest = max(farthest, make_pair(depth + 1, u));
  for (auto v : a[u]) {
    if (v == p) continue;
    dfs(v, u, depth + 1, farthest);
  }
}
void pdfs(int u, int p) {
  maxDepth[u] = 1;
  for (auto v : a[u]) {
    if (v == p) continue;
    pdfs(v, u);
    maxDepth[u] = max(maxDepth[u], maxDepth[v] + 1);
  }
}
void checkdfs(int u, int p, int depth) {
  vector<pair<int, int> > ad;
  for (auto v : a[u]) {
    if (v == p) continue;
    ad.push_back(make_pair(maxDepth[v], v));
  }
  sort(ad.begin(), ad.end(), greater<pair<int, int> >());
  for (auto v : a[u]) {
    if (v == p) continue;
    if (v == ad.front().second) {
      int other = 0;
      if (ad.size() >= 2) other = ad[1].first;
      checkdfs(v, u, max(depth, other) + 1);
    } else {
      checkdfs(v, u, max(depth, ad.front().first) + 1);
    }
  }
  if (depth != 0) ad.push_back(make_pair(depth, 0));
  sort(ad.begin(), ad.end(), greater<pair<int, int> >());
  if (ad.size() >= 3) {
    if (ad[1].first + ad[2].first + 1 >= length) {
      cout << "No" << '\n';
      exit(0);
    }
  }
}
int color[N];
set<int> unused;
deque<int> dq;
void addFront(int u) {
  unused.erase(color[u]);
  dq.push_front(u);
};
void addBack(int u) {
  unused.erase(color[u]);
  dq.push_back(u);
};
void popFront() {
  unused.insert(color[dq.front()]);
  dq.pop_front();
};
int popBack() {
  int ret = dq.back();
  unused.insert(color[ret]);
  dq.pop_back();
  return ret;
};
void dfsColor(int u, int p) {
  int whPopBack = -1;
  assert(dq.size() <= length);
  if (dq.size() == length) whPopBack = popBack();
  color[u] = *unused.begin();
  addFront(u);
  for (auto v : a[u]) {
    if (v != p) dfsColor(v, u);
  }
  popFront();
  if (whPopBack != -1) addBack(whPopBack);
}
void solve(vector<int> arr) {
  int d = arr.size();
  memset(color, -1, sizeof(color));
  int tick = 0;
  for (auto &u : arr) {
    color[u] = tick;
    tick = (tick + 1) % length;
  }
  auto doColor = [&](int l, int r) {
    unused.clear();
    dq.clear();
    for (signed i = (0); i <= (length - 1); i++) unused.insert(i);
    int iter = min((int)arr.size() - 1, l + length - 1);
    for (signed i = (l); i <= (iter); i++) addBack(arr[i]);
    for (signed i = (l); i <= (r); i++) {
      if (i != l) {
        popFront();
        if (iter + 1 < arr.size()) iter++, addBack(arr[iter]);
      }
      for (auto v : a[arr[i]])
        if (color[v] == -1) dfsColor(v, arr[i]);
    }
  };
  doColor(0, (d + 1) / 2 - 1);
  reverse(arr.begin(), arr.end());
  doColor(0, (d + 1) / 2 - 1);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  memset(color, -1, sizeof(color));
  cin >> n >> length;
  for (signed i = (1); i <= (n - 1); i++) {
    int u, v;
    cin >> u >> v;
    a[u].push_back(v);
    a[v].push_back(u);
  }
  pdfs(1, 1);
  if (length > 2) {
    checkdfs(1, 1, 0);
  }
  pair<int, int> farthest = make_pair(0, 1);
  dfs(1, 1, 0, farthest);
  int piv = farthest.second;
  farthest = make_pair(0, piv);
  dfs(piv, piv, 0, farthest);
  piv = farthest.second;
  vector<int> b;
  b.push_back(piv);
  while (par[piv] != piv) {
    piv = par[piv];
    b.push_back(piv);
  }
  solve(b);
  cout << "Yes" << '\n';
  for (signed i = (1); i <= (n); i++) {
    assert(color[i] != -1);
    cout << color[i] + 1 << ' ';
  }
  cout << '\n';
}