#P1307F. Cow and Vacation

    ID: 3570 Type: RemoteJudge 2000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 10 Uploaded By: Tags>dfs and similardsutrees*3300

Cow and Vacation

Description

Bessie is planning a vacation! In Cow-lifornia, there are nn cities, with n1n-1 bidirectional roads connecting them. It is guaranteed that one can reach any city from any other city.

Bessie is considering vv possible vacation plans, with the ii-th one consisting of a start city aia_i and destination city bib_i.

It is known that only rr of the cities have rest stops. Bessie gets tired easily, and cannot travel across more than kk consecutive roads without resting. In fact, she is so desperate to rest that she may travel through the same city multiple times in order to do so.

For each of the vacation plans, does there exist a way for Bessie to travel from the starting city to the destination city?

The first line contains three integers nn, kk, and rr (2n21052 \le n \le 2 \cdot 10^5, 1k,rn1 \le k,r \le n)  — the number of cities, the maximum number of roads Bessie is willing to travel through in a row without resting, and the number of rest stops.

Each of the following n1n-1 lines contain two integers xix_i and yiy_i (1xi,yin1 \le x_i, y_i \le n, xiyix_i \neq y_i), meaning city xix_i and city yiy_i are connected by a road.

The next line contains rr integers separated by spaces  — the cities with rest stops. Each city will appear at most once.

The next line contains vv (1v21051 \le v \le 2 \cdot 10^5)  — the number of vacation plans.

Each of the following vv lines contain two integers aia_i and bib_i (1ai,bin1 \le a_i, b_i \le n, aibia_i \ne b_i)  — the start and end city of the vacation plan.

If Bessie can reach her destination without traveling across more than kk roads without resting for the ii-th vacation plan, print YES. Otherwise, print NO.

Input

The first line contains three integers nn, kk, and rr (2n21052 \le n \le 2 \cdot 10^5, 1k,rn1 \le k,r \le n)  — the number of cities, the maximum number of roads Bessie is willing to travel through in a row without resting, and the number of rest stops.

Each of the following n1n-1 lines contain two integers xix_i and yiy_i (1xi,yin1 \le x_i, y_i \le n, xiyix_i \neq y_i), meaning city xix_i and city yiy_i are connected by a road.

The next line contains rr integers separated by spaces  — the cities with rest stops. Each city will appear at most once.

The next line contains vv (1v21051 \le v \le 2 \cdot 10^5)  — the number of vacation plans.

Each of the following vv lines contain two integers aia_i and bib_i (1ai,bin1 \le a_i, b_i \le n, aibia_i \ne b_i)  — the start and end city of the vacation plan.

Output

If Bessie can reach her destination without traveling across more than kk roads without resting for the ii-th vacation plan, print YES. Otherwise, print NO.

Sample Input 1

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

Sample Output 1

YES
YES
NO

Sample Input 2

8 3 3
1 2
2 3
3 4
4 5
4 6
6 7
7 8
2 5 8
2
7 1
8 1

Sample Output 2

YES
NO

Note

The graph for the first example is shown below. The rest stop is denoted by red.

For the first query, Bessie can visit these cities in order: 1,2,31, 2, 3.

For the second query, Bessie can visit these cities in order: 3,2,4,53, 2, 4, 5.

For the third query, Bessie cannot travel to her destination. For example, if she attempts to travel this way: 3,2,4,5,63, 2, 4, 5, 6, she travels on more than 22 roads without resting.

The graph for the second example is shown below.