Given a tree with $n$ nodes.
There are $m$ queries. For each query, you are given an integer $k$, and you need to determine whether there exists a path of length $k$ in the tree.
Input
The first line contains two integers $n$ and $m$.
The next $n-1$ lines each contain three integers $u, v, w$, representing an edge between $u$ and $v$ with weight $w$.
The following $m$ lines each contain an integer $k$, representing a query.
Output
For each query, output Yes if such a path exists, otherwise output No.
Subtasks
For $100\%$ of the data, $1 \leq n \leq 3 \times 10^4$, $1 \leq m \leq 100$, $1 \leq k \leq 10^7$, $1 \leq u, v \leq n$, and $1 \leq w \leq 10^4$.
Examples
Input 1
14 10
2 1 7
3 1 19
4 3 9
5 1 1
6 4 20
7 1 5
8 3 19
9 8 1
10 4 5
11 7 2
12 10 11
13 12 12
14 11 7
6
12
18
22
26
31
35
42
45
53
Output 1
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes