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>
template <class T>
T Min(const T &a, const T &b) {
  return a < b ? a : b;
}
template <class T>
T Max(const T &a, const T &b) {
  return a > b ? a : b;
}
template <class T>
bool Chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool Chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
struct fast_input {
  static const int L = 1 << 15 | 1;
  char buf[L], *l, *r;
  fast_input() { l = r = buf; }
  void Next(char &c) {
    if (l == r) r = (l = buf) + fread(buf, 1, L, stdin);
    c = l == r ? (char)EOF : *l++;
  }
  template <class T>
  void operator()(T &x) {
    char c, f = 0;
    for (Next(c); !isdigit(c); Next(c))
      if (c == '-') f = 1;
    for (x = 0; isdigit(c); Next(c)) x = x * 10 + c - '0';
    if (f) x = -x;
  }
} input;
const int N = 200000 + 47;
const int INF = 0x3f3f3f3f;
int head[N], nxt[N << 1], to[N << 1], tot;
int mc1[N], mc2[N], fc1[N], fc2[N], n, k, ans[N];
void add(int x, int y) {
  nxt[++tot] = head[x], head[x] = tot, to[tot] = y;
  nxt[++tot] = head[y], head[y] = tot, to[tot] = x;
}
void solvek2(int x, int fa) {
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != fa) ans[to[i]] = ans[x] ^ 1, solvek2(to[i], x);
}
bool check1(int x, int fa) {
  int mx1 = -INF, mx2 = -INF, fr1 = 0, fr2 = 0, s = 1;
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != fa) {
      if (!check1(to[i], x)) return false;
      s = mc1[to[i]] < 0 ? 1 : mc1[to[i]] + 1;
      if (std::min(mx1 + mx2, std::min(mx1, mx2) + s) >= k - 1) return false;
      if (s > mx1)
        mx2 = mx1, fr2 = fr1, fr1 = to[i], mx1 = s;
      else if (Chkmax(mx2, s))
        fr2 = to[i];
    }
  mc1[x] = mx1, mc2[x] = mx2, fc1[x] = fr1, fc2[x] = fr2;
  return true;
}
bool check2(int x, int fa) {
  int t, ft, u;
  for (int i = head[x]; i; i = nxt[i])
    if ((u = to[i]) != fa) {
      if (fc1[x] != to[i])
        t = mc1[x] + 1, ft = x;
      else
        t = mc2[x] + 1, ft = x;
      if (t < 0) t = 1, ft = x;
      if (std::min(mc1[u] + mc2[u], std::min(mc1[u], mc2[u]) + t) >= k - 1)
        return false;
      if (t > mc1[u])
        mc2[u] = mc1[u], fc2[u] = fc1[u], mc1[u] = t, fc1[u] = x;
      else if (Chkmax(mc2[u], t))
        fc2[u] = x;
      if (!check2(to[i], x)) return false;
    }
  return true;
}
int goal, maxl;
int getfp(int x, int fa, int d) {
  if (Chkmax(maxl, d)) goal = x;
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != fa) getfp(to[i], x, d + 1);
}
int p1, p2, c1, c2;
bool getc(int x, int fa, int d) {
  if (x == p2) return true;
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != fa) {
      if (getc(to[i], x, d + 1)) {
        if (d == maxl / 2 + 1 && !c1) c1 = x;
        if (to[i] == c1) c2 = x;
        return true;
      }
    }
  return false;
}
bool printd(int x, int fa) {
  if (x == p2) {
    ans[x] = 1;
    return true;
  }
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != fa && printd(to[i], x)) {
      ans[x] = ans[to[i]] + 1;
      if (ans[x] > k) ans[x] -= k;
      return true;
    }
  return false;
}
void printo(int x, int fa, int t) {
  for (int i = head[x]; i; i = nxt[i]) {
    if (to[i] == fa) continue;
    if (ans[to[i]])
      printo(to[i], x, t);
    else {
      ans[to[i]] = ans[x] + t;
      if (ans[to[i]] > k) ans[to[i]] -= k;
      if (ans[to[i]] < 1) ans[to[i]] += k;
      printo(to[i], x, t);
    }
  }
}
int main() {
  int x, y, z;
  input(n), input(k);
  for (int i = 2; i <= n; ++i) input(x), input(y), add(x, y);
  if (k == 2) {
    ans[1] = 1, solvek2(1, -1);
    for (int i = (1), i_end = (n); i <= i_end; ++i)
      if (!ans[i]) ans[i] = 2;
  } else {
    if (!check1(1, -1)) {
      puts("No");
      return 0;
    }
    if (!check2(1, -1)) {
      puts("No");
      return 0;
    }
    maxl = -1, getfp(1, -1, 1), p1 = goal;
    maxl = -1, getfp(goal, -1, 1), p2 = goal;
    getc(p1, -1, 1);
    printd(p1, -1);
    printo(c1, c2, -1);
    printo(c2, c1, 1);
  }
  puts("Yes");
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  putchar(10);
  return 0;
}