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;
template <typename T>
T rd() {
  T nmb = 0;
  int sgn = 0;
  char chr = getchar();
  while (!isdigit(chr)) {
    if (chr == '-') sgn = 1;
    chr = getchar();
  }
  while (isdigit(chr)) {
    nmb = (nmb << 3) + (nmb << 1) + chr - '0';
    chr = getchar();
  }
  return sgn ? -nmb : nmb;
}
template <typename T>
void wt(T nmb) {
  if (nmb > 9) wt(nmb / 10);
  putchar(nmb % 10 + '0');
}
template <typename T>
void cmax(T &x, T y) {
  x = x > y ? x : y;
}
template <typename T>
void cmin(T &x, T y) {
  x = x < y ? x : y;
}
void proc_status() {
  freopen("/proc/self/status", "r", stdin);
  string chr;
  while (getline(cin, chr))
    if (chr[2] == 'P') {
      cerr << chr << endl;
      break;
    }
}
const int N = 2e5 + 10;
const int inf = 2e9;
int n, p;
vector<int> g[N];
int dep[N], fa[N], mx[N], sec[N], trd[N];
void dfs1(int x, int f) {
  dep[x] = dep[f] + 1;
  fa[x] = f;
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (k == f) continue;
    dfs1(k, x);
    if (mx[x] <= mx[k] + 1)
      trd[x] = sec[x], sec[x] = mx[x], mx[x] = mx[k] + 1;
    else if (sec[x] <= mx[k] + 1)
      trd[x] = sec[x], sec[x] = mx[k] + 1;
    else if (trd[x] < mx[k] + 1)
      trd[x] = mx[k] + 1;
  }
}
void check(int a, int b, int c, int d) {
  if (d >= a)
    c = b, b = a, a = d;
  else if (d >= b)
    c = b, b = d;
  else if (d > c)
    c = d;
  if (c && b + c + 1 >= p) puts("No"), exit(0);
}
int st[N], pre[N], top;
void dfs2(int x, int f) {
  check(mx[x], sec[x], trd[x], pre[top] + dep[x]);
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (k == f) continue;
    if (mx[k] + 1 == mx[x])
      st[++top] = sec[x] - dep[x];
    else
      st[++top] = mx[x] - dep[x];
    pre[top] = max(pre[top - 1], st[top]);
    dfs2(k, x);
    --top;
  }
}
int clr[N];
void clr1(int x, int c) {
  clr[x] = c;
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (!clr[k]) clr1(k, c % p + 1);
  }
}
void clr2(int x, int c) {
  clr[x] = c;
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (!clr[k]) clr2(k, c == 1 ? p : c - 1);
  }
}
void Init() {
  n = rd<int>(), p = rd<int>();
  for (int i = 1; i < n; ++i) {
    int x = rd<int>(), y = rd<int>();
    g[x].push_back(y), g[y].push_back(x);
  }
  if (p == 2) {
    clr1(1, 1);
    puts("Yes");
    for (int i = 1; i <= n; ++i) printf("%d ", clr[i]);
    puts("");
    exit(0);
  }
  dfs1(1, 0);
  st[0] = pre[0] = -inf, dfs2(1, 0);
}
int dfs(int x, int f, int len) {
  if (!len) return x;
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (k == f || mx[k] + 1 != mx[x]) continue;
    return dfs(k, x, len - 1);
  }
}
void Solve() {
  int Mx = 0, Pos = 0;
  for (int i = 1; i <= n; ++i)
    if (Mx < mx[i] + sec[i]) Mx = mx[i] + sec[i], Pos = i;
  int x = dfs(Pos, 0, (mx[Pos] - sec[Pos]) >> 1);
  int y;
  for (int i = g[x].size() - 1; ~i; --i) {
    int k = g[x][i];
    if (k != fa[x] && mx[k] + 1 == mx[x]) {
      y = k;
      break;
    }
  }
  clr[x] = 1, clr[y] = p;
  clr1(x, 1), clr2(y, p);
  puts("Yes");
  for (int i = 1; i <= n; ++i) printf("%d ", clr[i]);
  puts("");
}
int main() {
  Init();
  Solve();
  return 0;
}