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;
long long sqr(long long x) { return x * x; }
int mysqrt(long long x) {
  int l = 0, r = 1e9 + 1;
  while (r - l > 1) {
    int m = (l + r) / 2;
    if (m * (long long)m <= x)
      l = m;
    else
      r = m;
  }
  return l;
}
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rndll(
    chrono::high_resolution_clock::now().time_since_epoch().count());
long long AR = 19, BR = 13, CR = 23, XR = 228, YR = 322, MODR = 1e9 + 993;
long long myrand() {
  long long ZR = (XR * AR + YR * BR + CR) % MODR;
  XR = YR;
  YR = ZR;
  return ZR;
}
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
int gcdex(int a, int b, int &x, int &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  int x1, y1;
  int ret = gcdex(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return ret;
}
int Mod = 1e9 + 993;
int Bpow(int x, long long y) {
  int ret = 1;
  int w = x;
  while (y) {
    if (y & 1) ret = (ret * (long long)w) % Mod;
    w = (w * (long long)w) % Mod;
    y >>= 1;
  }
  return ret;
}
int Bdiv(int x) {
  int a, b;
  gcdex(x, Mod, a, b);
  if (a < 0) a += Mod;
  return a;
}
int Bdiv(int x, int y) { return (x * (long long)Bpow(y, Mod - 2)) % Mod; }
inline int ad(int x, int y) { return x + y >= Mod ? x + y - Mod : x + y; }
inline int dif(int x, int y) { return x - y < 0 ? x - y + Mod : x - y; }
inline int mul(int x, int y) { return (x * (long long)y) % Mod; }
int inv(int a) {
  int b = Mod, x = 0, y = 1;
  while (a) {
    int t = b / a;
    b -= a * t;
    x -= t * y;
    swap(a, b);
    swap(x, y);
  }
  if (x < 0) x += Mod;
  return x;
}
void setmin(int &x, int y) { x = min(x, y); }
void setmax(int &x, int y) { x = max(x, y); }
void setmin(long long &x, long long y) { x = min(x, y); }
void setmax(long long &x, long long y) { x = max(x, y); }
const long long llinf = 1e18 + 100;
const long double eps = 1e-9;
const int maxn = 2e5 + 100, maxw = 1e6 + 100, inf = 1e9 + 100, sq = 100, X = 43,
          LG = 17;
vector<int> e[maxn];
int n, k;
int col[maxn];
void dfs_2(int v, int par) {
  for (int i : e[v])
    if (i != par) {
      col[i] = col[v] ^ 1;
      dfs_2(i, v);
    }
}
int dst[maxn];
void dfind(int v, int par) {
  for (int i : e[v])
    if (i != par) {
      dst[i] = dst[v] + 1;
      dfind(i, v);
    }
}
vector<int> g;
bool dget(int v, int par, int B) {
  if (v == B) {
    g.push_back(B);
    return 1;
  }
  for (int i : e[v])
    if (i != par) {
      if (dget(i, v, B)) {
        g.push_back(v);
        return 1;
      }
    }
  return 0;
}
bool vis[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int v, u;
    cin >> v >> u;
    v--;
    u--;
    e[v].push_back(u);
    e[u].push_back(v);
  }
  if (k == 2) {
    cout << "Yes\n";
    dfs_2(0, -1);
    for (int i = 0; i < n; i++) cout << col[i] + 1 << ' ';
    cout << '\n';
    return 0;
  }
  dfind(0, -1);
  int A = 0;
  for (int i = 0; i < n; i++)
    if (dst[i] > dst[A]) A = i;
  memset(dst, 0, sizeof(dst));
  dfind(A, -1);
  int B = 0;
  for (int i = 0; i < n; i++)
    if (dst[i] > dst[B]) B = i;
  dget(A, -1, B);
  for (int i = 0; i < g.size(); i++) col[g[i]] = i % k, vis[g[i]] = 1;
  for (int it = 0; it < g.size(); it++) {
    bool lf = (it > g.size() - 1 - it);
    int small;
    if (lf)
      small = g.size() - 1 - it;
    else
      small = it;
    function<void(int, int, int)> dfs = [&](int v, int par, int len) {
      if (small + len + 1 >= k) {
        cout << "No\n";
        exit(0);
      }
      if (lf)
        col[v] = col[g[it + len]];
      else
        col[v] = col[g[it - len]];
      for (int i : e[v])
        if (i != par) dfs(i, v, len + 1);
    };
    for (int i : e[g[it]])
      if (!vis[i]) dfs(i, g[it], 1);
  }
  cout << "Yes\n";
  for (int i = 0; i < n; i++) cout << col[i] + 1 << ' ';
  cout << '\n';
}