K. Monsters - Dark Purple
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Apple and Meska were roaming around the university, giving students terrible relationship advices. Khaled was aware of these two monsters, and chose to stay away from them to protect himself.

The university is represented as a tree with $$$n$$$ nodes. The distance between Asem and Meska is maximal at minute $$$0$$$ (they are positioned as far away as possible from each other). Khaled has to choose a node to sit in (he can't move). Asem and Meska will start moving towards Khaled, in one minute they can travel from one node to another. The minute either Asem or Meska reach Khaled, his romantic life switches from happy to miserable instantly. Will Khaled be happy at minute $$$k$$$?

A tree is an undirected connected graph that has no cycles.

Input

The first line of input contains one integer $$$t$$$ ($$$1 \le t \le 100$$$).

The first line of each test case contains two integers $$$n$$$ and $$$k$$$ $$$(3 \le n \le 10^5, 1 \le k \le 10^9)$$$.

The next $$$n - 1$$$ nodes contain two integers $$$u_i$$$ and $$$v_i$$$ - the indices of vertices connected by the $$$i$$$-th edge.

it is guaranteed that the sum of $$$n$$$ over all tests does not exceed $$$10^5$$$.

Output

For each test case output "YES" if Khaled will be happy at minute k or "NO" if not. The output is case sensitive so please output it as stated above.

Examples
Input
3
7 2
1 2
2 3
2 4
4 5
5 6
5 7
7 2
1 2
2 3
2 4
4 5
4 6
6 7
3 1
1 2
2 3
Output
NO
YES
NO
Input
4
4 1
1 2
2 3
3 4
6 2
1 2
1 3
1 4
4 5
3 6
10 2
1 2
2 3
1 4
2 5
5 6
6 7
6 8
1 9
1 10
6 6
1 2
1 3
2 4
2 5
2 6
Output
NO
YES
YES
NO
Note

This is the tree described in test case $$$1$$$. $$$k = 2$$$.

This picture shows Asem and Meska at minute $$$0$$$. This is one way they can be placed such that the distance between them is maximal. It can be proven that it is impossible for Khaled to be happy at minute $$$2$$$ no matter which node he chooses to stay at.