# Path

Time Limit: 10000ms

Memory Limit: 65535kb

## Description

Check if there exists a path of length L in the given tree with weight assigned to each edges.

## Input

Only one test case.

The first line contains two integers n and q, which denote the number of nodes and queries, repectively.

The following (n−1) with three integers ai,bi,ci, which denote the edge between ai and bi, with weight ci.

Note that the nodes are labled by 1,2,…,n.

The last line contains q integers L1,L2,…,Lq, denote the queries.

(1≤n,q≤10^5,1≤ci≤2)

## Output

For each query, print the result in seperated line. If there exists path of given length, print "Yes". Otherwise, print "No".

## Sample Input

4 6
1 2 2
2 3 1
3 4 2
0 1 2 3 4 5


## Sample Output

Yes
Yes
Yes
Yes
No
Yes


None