package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
buf := make([]byte, 1024*1024*10)
scanner.Buffer(buf, 1024*1024*10)
scanner.Split(bufio.ScanWords)
out := bufio.NewWriter(os.Stdout)
defer out.Flush()
nextInt := func() int {
scanner.Scan()
n, _ := strconv.Atoi(scanner.Text())
return n
}
if !scanner.Scan() {
return
}
n, _ := strconv.Atoi(scanner.Text())
k := nextInt()
r := nextInt()
adj := make([][]int, n+1)
for i := 0; i < n-1; i++ {
u := nextInt()
v := nextInt()
adj[u] = append(adj[u], v)
adj[v] = append(adj[v], u)
}
restStops := make([]int, r)
for i := 0; i < r; i++ {
restStops[i] = nextInt()
}
D := make([]int, n+1)
for i := 1; i <= n; i++ {
D[i] = -1
}
queue := make([]int, 0, n)
for _, rs := range restStops {
D[rs] = 0
queue = append(queue, rs)
}
for len(queue) > 0 {
u := queue[0]
queue = queue[1:]
for _, v := range adj[u] {
if D[v] == -1 {
D[v] = D[u] + 1
queue = append(queue, v)
}
}
}
parent := make([]int, n+1)
for i := 1; i <= n; i++ {
parent[i] = i
}
var find func(int) int
find = func(i int) int {
if parent[i] == i {
return i
}
parent[i] = find(parent[i])
return parent[i]
}
union := func(i, j int) {
rootI := find(i)
rootJ := find(j)
if rootI != rootJ {
parent[rootI] = rootJ
}
}
depth := make([]int, n+1)
up := make([][20]int, n+1)
var dfs func(u, p, d int)
dfs = func(u, p, d int) {
depth[u] = d
up[u][0] = p
for i := 1; i < 20; i++ {
up[u][i] = up[up[u][i-1]][i-1]
}
for _, v := range adj[u] {
if v != p {
dfs(v, u, d+1)
if D[u]+D[v]+1 <= k {
union(u, v)
}
}
}
}
dfs(1, 0, 1)
getLCA := func(u, v int) int {
if depth[u] < depth[v] {
u, v = v, u
}
for i := 19; i >= 0; i-- {
if depth[u]-(1<<i) >= depth[v] {
u = up[u][i]
}
}
if u == v {
return u
}
for i := 19; i >= 0; i-- {
if up[u][i] != up[v][i] {
u = up[u][i]
v = up[v][i]
}
}
return up[u][0]
}
getDist := func(u, v int) int {
return depth[u] + depth[v] - 2*depth[getLCA(u, v)]
}
vQueries := nextInt()
for i := 0; i < vQueries; i++ {
a := nextInt()
b := nextInt()
if getDist(a, b) <= k {
fmt.Fprintln(out, "YES")
continue
}
if D[a] > k || D[b] > k {
fmt.Fprintln(out, "NO")
continue
}
lca := getLCA(a, b)
dist_a_lca := depth[a] - depth[lca]
var X int
if dist_a_lca+D[lca] <= k {
if getDist(a, b)+D[b] <= k {
X = b
} else {
u := b
for j := 19; j >= 0; j-- {
nxt := up[u][j]
if nxt != 0 && depth[nxt] > depth[lca] {
d_a_nxt := dist_a_lca + (depth[nxt] - depth[lca])
if d_a_nxt+D[nxt] > k {
u = nxt
}
}
}
X = up[u][0]
}
} else {
u := a
for j := 19; j >= 0; j-- {
nxt := up[u][j]
if nxt != 0 && depth[nxt] >= depth[lca] {
d_a_nxt := depth[a] - depth[nxt]
if d_a_nxt+D[nxt] <= k {
u = nxt
}
}
}
X = u
}
dist_b_lca := depth[b] - depth[lca]
var Y int
if dist_b_lca+D[lca] <= k {
if getDist(b, a)+D[a] <= k {
Y = a
} else {
u := a
for j := 19; j >= 0; j-- {
nxt := up[u][j]
if nxt != 0 && depth[nxt] > depth[lca] {
d_b_nxt := dist_b_lca + (depth[nxt] - depth[lca])
if d_b_nxt+D[nxt] > k {
u = nxt
}
}
}
Y = up[u][0]
}
} else {
u := b
for j := 19; j >= 0; j-- {
nxt := up[u][j]
if nxt != 0 && depth[nxt] >= depth[lca] {
d_b_nxt := depth[b] - depth[nxt]
if d_b_nxt+D[nxt] <= k {
u = nxt
}
}
}
Y = u
}
if getDist(a, X) >= getDist(a, Y) {
fmt.Fprintln(out, "YES")
} else if find(X) == find(Y) {
fmt.Fprintln(out, "YES")
} else {
fmt.Fprintln(out, "NO")
}
}
}