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;
const int inf = 1e9 + 9;
const long long int MOD = 1e9 + 696969;
mt19937_64 rng(time(0));
int random(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
const long long INF = 1e18;
const int maxn = 400100;
int spo, n, k;
vector<int> v[maxn];
vector<bool> odw;
vector<int> dist;
vector<int> par;
vector<bool> on_path;
int f[maxn];
vector<int> path;
int dist_path[maxn];
int PATHLEN;
void initdfs(int x) {
  odw[x] = 1;
  for (auto u : v[x]) {
    if (!odw[u]) {
      par[u] = x;
      dist[u] = dist[x] + 1;
      initdfs(u);
    }
  }
}
void setup() {
  odw.clear();
  dist.clear();
  par.clear();
  odw.resize(n + 1, 0);
  dist.resize(n + 1, 0);
  par.resize(n + 1, 0);
}
inline int find(int x) {
  if (f[x] == x) return x;
  f[x] = find(f[x]);
  return f[x];
}
inline void lacz(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  --spo;
  f[x] = y;
}
vector<int> stos;
void dfs(int x, int pos_root) {
  stos.push_back(x);
  odw[x] = 1;
  if (!on_path[x]) {
    int i = stos.size() - 1;
    if (i - k >= 0) {
      lacz(stos[i], stos[i - k]);
    } else {
      int di = k;
      di -= dist[x];
      if (pos_root - di >= 0) {
        lacz(stos[i], path[pos_root - di]);
      }
      if (pos_root + di < (int)path.size()) {
        lacz(stos[i], path[pos_root + di]);
      }
      int d1 = dist[x] + pos_root;
      int d2 = dist[x] + (int)(path).size() - pos_root - 1;
      if (d1 >= d2) {
        lacz(stos[i], path[pos_root + dist[x]]);
      } else {
        lacz(stos[i], path[pos_root - dist[x]]);
      }
    }
  }
  for (auto u : v[x]) {
    if (!odw[u] && !on_path[u]) {
      dist[u] = dist[x] + 1;
      dfs(u, pos_root);
    }
  }
  stos.pop_back();
}
int seen[maxn];
int colors[maxn];
int gold[maxn];
int sz[maxn];
int maxsub[maxn];
void prep(int x, vector<int> &nodes) {
  odw[x] = 1;
  nodes.push_back(x);
  sz[x] = 1;
  for (auto u : v[x]) {
    if (!gold[u] && !odw[u]) {
      prep(u, nodes);
      sz[x] += sz[u];
      maxsub[x] = max(maxsub[x], sz[u]);
    }
  }
}
long long int weight[maxn];
long long int SUM;
long long int hasz[maxn];
int depth[maxn];
bool ist[maxn];
long long int MAX[maxn];
long long int MIN[maxn];
bool ansdfs(int x, vector<int> &vec) {
  bool ans = true;
  stos.push_back(x);
  odw[x] = 1;
  vec.push_back(x);
  hasz[x] = hasz[par[x]] + weight[colors[x]];
  depth[x] = 1 + depth[par[x]];
  if (depth[x] >= k) {
    long long int tmp = hasz[x] - hasz[stos[depth[x] - k]];
    if (tmp != SUM) ans = false;
  } else if (depth[x] == k - 1) {
    if (hasz[x] != SUM) ans = false;
  } else {
    int search_for = k - depth[x] - 1;
    if (ist[search_for]) {
      if (MAX[search_for] + hasz[x] - hasz[stos[0]] != SUM) ans = false;
      if (MIN[search_for] + hasz[x] - hasz[stos[0]] != SUM) ans = false;
    }
  }
  for (auto u : v[x]) {
    if (!gold[u] && !odw[u]) {
      par[u] = x;
      ans &= ansdfs(u, vec);
    }
  }
  stos.pop_back();
  return ans;
}
bool find_answers(int root) {
  hasz[root] = weight[colors[root]];
  depth[root] = 0;
  bool all_ok = true;
  stos.clear();
  stos.push_back(root);
  for (auto nei : v[root]) {
    if (!gold[nei]) {
      par[nei] = root;
      vector<int> child;
      all_ok &= ansdfs(nei, child);
      for (auto &node : child) {
        int dp = depth[node];
        if (ist[dp]) {
          MAX[dp] = max(MAX[dp], hasz[node]);
          MIN[dp] = min(MIN[dp], hasz[node]);
        } else {
          ist[dp] = 1;
          MAX[dp] = hasz[node];
          MIN[dp] = hasz[node];
        }
      }
    }
  }
  stos.clear();
  return all_ok;
}
bool cd(int x) {
  vector<int> component;
  prep(x, component);
  int N = (int)(component).size();
  int cen = -1;
  for (auto &node : component) {
    maxsub[node] = max(maxsub[node], N - sz[node]);
    if (maxsub[node] <= N / 2) cen = node;
    odw[node] = 0;
    sz[node] = 0;
    maxsub[node] = 0;
  }
  assert(cen != -1);
  gold[cen] = 1;
  bool ans = find_answers(cen);
  for (auto &node : component) {
    odw[node] = 0;
    sz[node] = 0;
    maxsub[node] = 0;
    ist[depth[node]] = 0;
  }
  for (auto u : v[cen]) {
    if (!gold[u]) {
      ans &= cd(u);
    }
  }
  return ans;
}
long long int WAGA = 1e12;
bool check() {
  setup();
  for (int i = (1); i <= (k); ++i) {
    weight[i] = ((long long int)rand() * rand() + WAGA) % WAGA;
    SUM += weight[i];
  }
  return cd(1);
}
int A[maxn];
void solve() {
  cin >> n >> k;
  spo = n + k;
  for (int i = (1); i <= (n + k); ++i) f[i] = i;
  for (int i = (2); i <= (n); ++i) {
    int a, b;
    cin >> a >> b;
    A[i] = a;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  on_path.resize(n + 1, 0);
  setup();
  initdfs(1);
  int best = 1;
  for (int i = (2); i <= (n); ++i)
    if (dist[i] > dist[best]) best = i;
  int x = best;
  setup();
  initdfs(best);
  best = 1;
  for (int i = (2); i <= (n); ++i)
    if (dist[i] > dist[best]) best = i;
  int y = best;
  int gdzie = y;
  on_path[gdzie] = 1;
  path = {y};
  dist_path[y] = dist[y];
  while (gdzie != x) {
    gdzie = par[gdzie];
    dist_path[gdzie] = dist[gdzie];
    on_path[gdzie] = 1;
    path.push_back(gdzie);
  }
  reverse(begin(path), end(path));
  0 && cerr;
  setup();
  for (int i = 0; i < (int)(path).size(); ++i) {
    int jaki_kolor = i % k;
    lacz(path[i], n + 1 + jaki_kolor);
  }
  for (int i = 0; i < (int)(path).size(); ++i) {
    dfs(path[i], i);
  }
  if (spo < k) {
    cout << "No";
    exit(0);
  };
  int COL = 0;
  for (int i = (1); i <= (n); ++i) {
    int cc = find(i);
    if (!seen[cc]) {
      if (COL < k) ++COL;
      seen[cc] = COL;
    }
    colors[i] = seen[cc];
  }
  if (check()) {
    cout << "Yes\n";
    for (int i = (1); i <= (n); ++i) {
      cout << colors[i] << ' ';
    }
    cout << endl;
  } else {
    cout << "No\n";
  }
}
int main() {
  srand(2137);
  {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  };
  int tests;
  tests = 1;
  while (tests--) {
    solve();
  }
}