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>
#pragma GCC optimize("Ofast")
using namespace std;
int n, k;
vector<int> a[200010];
pair<int, pair<int, int> > down[200010];
pair<int, pair<int, int> > downid[200010];
int up[200010];
bool vis[200010];
pair<int, pair<int, int> > dfs(int x) {
  vis[x] = 1;
  pair<int, pair<int, int> > ans = make_pair(0, make_pair(0, 0));
  pair<int, pair<int, int> > id = make_pair(0, make_pair(0, 0));
  vector<pair<int, int> > v;
  for (int i = 0; i < a[x].size(); i++) {
    if (!vis[a[x][i]]) v.push_back(make_pair(dfs(a[x][i]).first + 1, a[x][i]));
  }
  sort(v.begin(), v.end(), greater<pair<int, int> >());
  if (v.size() >= 1) {
    ans.first = v[0].first;
    id.first = v[0].second;
  }
  if (v.size() >= 2) {
    ans.second.first = v[1].first;
    id.second.first = v[1].second;
  }
  if (v.size() >= 3) {
    ans.second.second = v[2].first;
    id.second.second = v[2].second;
  }
  down[x] = ans;
  downid[x] = id;
  return ans;
}
void dfs2(int x, int anc) {
  vis[x] = 1;
  int ans = 0;
  if (anc) {
    if (downid[anc].first != x) ans = max(ans, down[anc].first + 1);
    if (downid[anc].second.first != x)
      ans = max(ans, down[anc].second.first + 1);
    if (downid[anc].second.second != x)
      ans = max(ans, down[anc].second.second + 1);
    ans = max(ans, up[anc] + 1);
  }
  up[x] = ans;
  for (int i = 0; i < a[x].size(); i++)
    if (!vis[a[x][i]]) dfs2(a[x][i], x);
}
bool pan(pair<int, pair<int, int> > x, int y) {
  int a[4];
  a[0] = x.first;
  a[1] = x.second.first;
  a[2] = x.second.second;
  a[3] = y;
  sort(a, a + 4);
  int cnt = 0;
  for (int i = 0; i < int(4); i++)
    if (a[i] > 0) cnt++;
  if (cnt >= 3 && a[1] + a[2] >= k - 1) return 0;
  return 1;
}
int dep[200010];
int nowdep;
void dfs3(int x) {
  vis[x] = 1;
  dep[x] = nowdep;
  for (int i = 0; i < int(a[x].size()); i++) {
    if (!vis[a[x][i]]) {
      nowdep++;
      dfs3(a[x][i]);
      nowdep--;
    }
  }
}
pair<int, int> depanc[200010];
void dfs4(int x, int anc) {
  vis[x] = 1;
  depanc[x] = make_pair(nowdep, anc);
  for (int i = 0; i < int(a[x].size()); i++) {
    if (!vis[a[x][i]]) {
      nowdep++;
      dfs4(a[x][i], x);
      nowdep--;
    }
  }
}
int nxt(int x) {
  if (x == k) return 1;
  return x + 1;
}
int prev(int x) {
  if (x == 1) return k;
  return x - 1;
}
vector<int> dia;
int op[200010];
void dfsleft(int x, int col) {
  vis[x] = 1;
  op[x] = col;
  for (int i = 0; i < int(a[x].size()); i++) {
    if (!vis[a[x][i]]) {
      dfsleft(a[x][i], prev(col));
    }
  }
}
void dfsright(int x, int col) {
  vis[x] = 1;
  op[x] = col;
  for (int i = 0; i < int(a[x].size()); i++) {
    if (!vis[a[x][i]]) {
      dfsright(a[x][i], nxt(col));
    }
  }
}
int opfor2[200010];
int nownum = 1;
void dfsfor2(int x) {
  vis[x] = 1;
  opfor2[x] = nownum;
  for (int i = 0; i < int(a[x].size()); i++) {
    if (!vis[a[x][i]]) {
      nownum = 3 - nownum;
      dfsfor2(a[x][i]);
      nownum = 3 - nownum;
    }
  }
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 0; i < int(n - 1); i++) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  if (k == 2) {
    dfsfor2(1);
    cout << "YES" << endl;
    for (int i = 1; i <= int(n); i++) cout << opfor2[i] << " ";
    cout << endl;
    return 0;
  }
  for (int i = 1; i <= int(n); i++) vis[i] = 0;
  dfs(1);
  for (int i = 1; i <= int(n); i++) vis[i] = 0;
  dfs2(1, 0);
  bool ok = 1;
  for (int i = 1; i <= int(n); i++) {
    if (!pan(down[i], up[i])) {
      ok = 0;
      break;
    }
  }
  if (!ok) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= int(n); i++) vis[i] = 0;
  dfs3(1);
  int st = max_element(dep + 1, dep + 1 + n) - dep;
  for (int i = 1; i <= int(n); i++) vis[i] = 0;
  nowdep = 0;
  dfs4(st, 0);
  int en = max_element(depanc + 1, depanc + 1 + n) - depanc;
  while (en) {
    dia.push_back(en);
    en = depanc[en].second;
  }
  for (int i = 1; i <= int(n); i++) vis[i] = 0;
  int nowcol = 1;
  for (int i = 0; i < int(dia.size()); i++) {
    op[dia[i]] = nowcol;
    nowcol = nxt(nowcol);
    vis[dia[i]] = 1;
  }
  for (int i = 0; i < int(dia.size()); i++) {
    if (i < dia.size() / 2)
      dfsleft(dia[i], op[dia[i]]);
    else
      dfsright(dia[i], op[dia[i]]);
  }
  for (int i = 1; i <= int(n); i++) cout << op[i] << " ";
  cout << endl;
}