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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.io.UncheckedIOException;
import java.util.List;
import java.io.Closeable;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(null, new TaskAdapter(), "", 1 << 27);
        thread.start();
        thread.join();
    }

    static class TaskAdapter implements Runnable {
        @Override
        public void run() {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            FastInput in = new FastInput(inputStream);
            FastOutput out = new FastOutput(outputStream);
            TaskH solver = new TaskH();
            solver.solve(1, in, out);
            out.close();
        }
    }

    static class TaskH {
        boolean valid = true;

        public void solve(int testNumber, FastInput in, FastOutput out) {
            int n = in.readInt();
            int k = in.readInt();
            Node[] nodes = new Node[n + 1];
            for (int i = 1; i <= n; i++) {
                nodes[i] = new Node();
                nodes[i].id = i;
            }
            for (int i = 1; i < n; i++) {
                Node a = nodes[in.readInt()];
                Node b = nodes[in.readInt()];
                a.next.add(b);
                b.next.add(a);
            }
            findDiameter(nodes[1], null, 0);
            List<Node> trace = new ArrayList<>(n);
            dfsForTrace(nodes[1].a, null, 0, nodes[1].diameter, trace);

            int half = trace.size() / 2;
            Node a = trace.get(half - 1);
            Node b = trace.get(half);
            a.next.remove(b);
            b.next.remove(a);
            paint(a, b, 0, k, -1);
            paint(b, a, 1, k, 1);
            verify(a, b, 0, k);
            verify(b, a, 0, k);
            if (!valid) {
                out.println("No");
                return;
            }
            out.println("Yes");
            for (int i = 1; i <= n; i++) {
                out.append(nodes[i].color + 1).append(' ');
            }
        }

        public void verify(Node root, Node p, int depth, int k) {
            root.depth = depth;
            root.depthest = root;
            for (Node node : root.next) {
                if (node == p) {
                    continue;
                }
                verify(node, root, depth + 1, k);
                if (root.depthest != root && node.depthest.depth + root.depthest.depth - depth * 2 + 1 >= k && k > 2) {
                    valid = false;
                }
                if (node.depthest.depth > root.depthest.depth) {
                    root.depthest = node.depthest;
                }
            }
        }

        public void paint(Node root, Node p, int color, int k, int step) {
            root.color = DigitUtils.mod(color, k);
            for (Node node : root.next) {
                if (node == p) {
                    continue;
                }
                paint(node, root, color + step, k, step);
            }
        }

        public boolean dfsForTrace(Node root, Node p, int depth, int diameter, List<Node> trace) {
            trace.add(root);
            if (depth == diameter) {
                return true;
            }
            for (Node node : root.next) {
                if (node == p) {
                    continue;
                }
                if (dfsForTrace(node, root, depth + 1, diameter, trace)) {
                    return true;
                }
            }
            trace.remove(trace.size() - 1);
            return false;
        }

        public void findDiameter(Node root, Node p, int depth) {
            root.depth = depth;
            root.depthest = root;
            for (Node node : root.next) {
                if (node == p) {
                    continue;
                }
                findDiameter(node, root, depth + 1);
                if (root.diameter < node.diameter) {
                    root.diameter = node.diameter;
                    root.a = node.a;
                }
                if (root.depthest.depth + node.depthest.depth - root.depth * 2 > root.diameter) {
                    root.diameter = root.depthest.depth + node.depthest.depth - 2 * root.depth;
                    root.a = root.depthest;
                }
                if (root.depthest.depth < node.depthest.depth) {
                    root.depthest = node.depthest;
                }
            }
        }

    }

    static class FastOutput implements AutoCloseable, Closeable {
        private StringBuilder cache = new StringBuilder(10 << 20);
        private final Writer os;

        public FastOutput(Writer os) {
            this.os = os;
        }

        public FastOutput(OutputStream os) {
            this(new OutputStreamWriter(os));
        }

        public FastOutput append(char c) {
            cache.append(c);
            return this;
        }

        public FastOutput append(int c) {
            cache.append(c);
            return this;
        }

        public FastOutput println(String c) {
            cache.append(c).append('\n');
            return this;
        }

        public FastOutput flush() {
            try {
                os.append(cache);
                os.flush();
                cache.setLength(0);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
            return this;
        }

        public void close() {
            flush();
            try {
                os.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        public String toString() {
            return cache.toString();
        }

    }

    static class Node {
        List<Node> next = new ArrayList<>();
        int color;
        Node depthest;
        int depth;
        int diameter;
        Node a;
        int id;

        public String toString() {
            return "" + id;
        }

    }

    static class DigitUtils {
        private DigitUtils() {
        }

        public static int mod(int x, int mod) {
            x %= mod;
            if (x < 0) {
                x += mod;
            }
            return x;
        }

    }

    static class FastInput {
        private final InputStream is;
        private byte[] buf = new byte[1 << 13];
        private int bufLen;
        private int bufOffset;
        private int next;

        public FastInput(InputStream is) {
            this.is = is;
        }

        private int read() {
            while (bufLen == bufOffset) {
                bufOffset = 0;
                try {
                    bufLen = is.read(buf);
                } catch (IOException e) {
                    bufLen = -1;
                }
                if (bufLen == -1) {
                    return -1;
                }
            }
            return buf[bufOffset++];
        }

        public void skipBlank() {
            while (next >= 0 && next <= 32) {
                next = read();
            }
        }

        public int readInt() {
            int sign = 1;

            skipBlank();
            if (next == '+' || next == '-') {
                sign = next == '+' ? 1 : -1;
                next = read();
            }

            int val = 0;
            if (sign == 1) {
                while (next >= '0' && next <= '9') {
                    val = val * 10 + next - '0';
                    next = read();
                }
            } else {
                while (next >= '0' && next <= '9') {
                    val = val * 10 - next + '0';
                    next = read();
                }
            }

            return val;
        }

    }
}