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>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
   
#include <x86intrin.h>
#include <bits/stdc++.h>   
 
using namespace std;
     
#define F first
 
#define S second
#define lb lower_bound               
#define ub upper_bound
#define pb push_back
#define pf push_front    
#define ppb pop_back
#define mp make_pair
#define bpp __builtin_popcountll                                                                                        
#define sqr(x) ((x) * (x)) 
#define al 0x3F3F3F3F
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define in insert
#define ppf pop_front
#define endl '\n'
//#define int long long
 
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
 
const int mod = (int)1e9 + 7;
const int N = (int)2e5 + 123;
const ll inf = (ll)3e18 + 1;
 
const double pi = acos (-1.0);
const double eps = 1e-7;                  
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
 
int n, k, c1, c2, mx, p[N], lvl[N], c[N], maxi[N], dp[N], par[N];
vector <int> ans, g[N];

void precalc (int v = 1, int pr = 0) {
   par[v] = pr;
   maxi[v] = 0;
   for (auto to : g[v])
      if (to != pr) {
         precalc (to, v); 
         maxi[v] = max (maxi[v], maxi[to] + 1);
      }
}

void pre (int v, int pr = 0) {
   if (dp[v] != -1) return;
   dp[v] = 0;
   for (auto to : g[v]) {
      if (to == pr) continue;
      pre (to, v);
      dp[v] = max (dp[v], dp[to] + 1);
   }    
}
 
void dfs (int v, int pr) {
   p[v] = pr;
   lvl[v] = lvl[pr] + 1;
   if (lvl[v] > mx) mx = lvl[v], c1 = v;
   for (auto to : g[v])
      if (to != pr)
         dfs (to, v);
}

inline int calc (int v, int pr, bool path) {
   lvl[pr] = 0;
   dfs (v, pr);
   c2 = c1;
   mx = 0;
   dfs (c2, 0);
   if (path) {
      int x = c1;
      while (x != c2) {
         ans.pb (x);
         x = p[x];
      }
      ans.pb (x);
      reverse (all (ans));
   }
   return mx;
}
 
inline int add (int a, int b) {
   a += b;
   if (a <= 0) a += k;
   if (a > k) a -= k;
   return a;
}
 
void f (int v, int pr, int dd) {
   if (!c[v]) c[v] = add (c[pr], dd);
   for (auto to : g[v]) {
      if (to != pr)
         f (to, v, dd);
   }
 
}
 
inline void boost () {                    
   ios_base :: sync_with_stdio (NULL);
   cin.tie (NULL), cout.tie (NULL);          
}                                                     
 
void r (int v, int pr = 0) {
   c[v] = (c[pr] ^ 1);
   for (auto to : g[v])
      if (to != pr)
         r (to, v);
}
 
inline void Solve () {
   cin >> n >> k;
   for (int i = 1; i < n; i ++) {
      int x, y;
      cin >> x >> y;
      g[x].pb (y);
      g[y].pb (x);
   }
   if (k == 2) {
      r (1);
      cout << "Yes\n";
      for (int i = 1; i <= n; i ++) cout << c[i] + 1 << ' ';   
      exit (0);
   }
   memset (dp, -1, sizeof dp);
   precalc ();
   for (int i = 2; i <= n; i ++)
      if (sz (g[i]) == 1)
         pre (i);
   calc (1, 0, 1);
   vector <int> s;
   for (int i = 1; i <= n; i ++) {
      s.clear ();
      if (sz (g[i]) < 3) continue;
      for (auto to : g[i]) {
         if (to != par[i]) s.pb (maxi[to] + 1);
         else s.pb (dp[to] + 1);
      }
      sort (all (s));
      int a = s[sz (s) - 1];
      int b = s[sz (s) - 2];
      int c = s[sz (s) - 3];
      if (a + b >= k - 1 && b + c >= k - 1 && a + c >= k - 1) cout << "No", exit (0);
   }
   c[ans[0]] = 1;
   for (int i = 1; i < sz (ans); i ++) c[ans[i]] = add (c[ans[i - 1]], 1);
   int mid = (sz (ans) + 1) / 2 - 1;
   int st = ans[mid];
   if (mid) f (ans[mid - 1], ans[mid], -1);
   if (mid < sz (ans) - 1) f (ans[mid + 1], ans[mid], 1);
   for (auto it : g[ans[mid]])
      if (!c[it])
         f (it, ans[mid], -1);
   cout << "Yes\n";
   for (int i = 1; i <= n; i ++) cout << c[i] << ' ';
   //for (auto it : ans) cout << it << ' ';
}                                     
 
main () {                                       
// freopen (".in", "r", stdin);    
// freopen (".out", "w", stdout);              
   boost ();
   int tt = 1;
// cin >> tt;   
   while (tt --) {
      Solve ();
   }                                               
   return 0;      
}