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

Bessie is considering v possible vacation plans, with the i-th one consisting of a start city a_i and destination city b_i.

It is known that only r of the cities have rest stops. Bessie gets tired easily, and cannot travel across more than k 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?

Input

The first line contains three integers n, k, and r (2 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ k,r ≤ 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 n-1 lines contain two integers x_i and y_i (1 ≤ x_i, y_i ≤ n, x_i ≠ y_i), meaning city x_i and city y_i are connected by a road. 

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

The next line contains v (1 ≤ v ≤ 2 ⋅ 10^5) — the number of vacation plans.

Each of the following v lines contain two integers a_i and b_i (1 ≤ a_i, b_i ≤ n, a_i ≠ b_i) — the start and end city of the vacation plan. 

Output

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

Examples

Input


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


Output


YES
YES
NO


Input


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


Output


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, 3.

For the second query, Bessie can visit these cities in order: 3, 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, 6, she travels on more than 2 roads without resting.

<image>

The graph for the second example is shown below. 

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int MX = 1e9 + 7;
const long long int INF = 1e18 + 9LL;
int n, k, r;
bool spec[N];
vector<int> G[N];
int id[N];
queue<int> Q;
int rep[N];
int tr[N], add[N];
set<pair<int, int> > S[N];
int lvl[N];
int jump[18][N];
int pre[N], post[N];
int q;
int ans[N];
vector<pair<int, int> > req[N];
int sz[N];
bool block[N];
int dists[N];
vector<int> colors;
void dfs(int u, int p) {
  static int Time = 0;
  pre[u] = ++Time;
  jump[0][u] = p;
  for (auto v : G[u])
    if (v != p) {
      lvl[v] = lvl[u] + 1;
      dfs(v, u);
    }
  post[u] = Time;
}
int Find(int u) {
  if (rep[u] == u) return u;
  return rep[u] = Find(rep[u]);
}
void Union(int u, int v) { rep[Find(u)] = Find(v); }
int connect(int a, int b) {
  add[b]++;
  if (S[a].size() > S[b].size()) swap(a, b);
  for (auto v : S[a]) S[b].insert({v.first + add[a] - add[b], v.second});
  S[a].clear();
  if (S[b].size() > 1) {
    auto it = *S[b].begin();
    S[b].erase(S[b].begin());
    while (S[b].size() > 0 &&
           (*S[b].begin()).first + it.first + 2 * add[b] <= k) {
      Union((*S[b].begin()).second, it.second);
      S[b].erase(S[b].begin());
    }
    S[b].insert(it);
  }
  return b;
}
void getGraph(int u, int p) {
  tr[u] = u;
  if (spec[u]) S[u].insert({0, u});
  for (auto v : G[u])
    if (v != p) {
      getGraph(v, u);
      tr[u] = connect(tr[u], tr[v]);
    }
}
void prepare() {
  for (int i = 1; i <= n; ++i)
    if (spec[i]) {
      id[i] = i;
      Q.push(i);
    } else
      id[i] = -1;
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (auto v : G[u])
      if (id[v] == -1) {
        id[v] = id[u];
        Q.push(v);
      }
  }
  dfs(1, 1);
  for (int i = 1; i < 18; ++i)
    for (int j = 1; j <= n; ++j) jump[i][j] = jump[i - 1][jump[i - 1][j]];
  for (int i = 1; i <= n; ++i) rep[i] = i;
  getGraph(1, 0);
}
bool dad(int u, int v) { return pre[u] <= pre[v] && post[v] <= post[u]; }
int lca(int u, int v) {
  for (int i = 18 - 1; i >= 0; --i)
    if (!dad(jump[i][u], v)) u = jump[i][u];
  if (!dad(u, v)) u = jump[0][u];
  return u;
}
int getHigher(int u, int d) {
  for (int i = 0; i < 18; ++i)
    if (d & (1 << i)) u = jump[i][u];
  return u;
}
void consider(int u, int v, int t) {
  int m = lca(u, v);
  if (lvl[u] + lvl[v] - 2 * lvl[m] <= k) {
    ans[t] = 3;
    return;
  }
  int d = lvl[u] + lvl[v] - 2 * lvl[m];
  d /= 2;
  if (lvl[u] > lvl[v]) swap(u, v);
  m = getHigher(v, d);
  int who = Find(id[m]);
  req[u].push_back({who, t});
  req[v].push_back({who, -t});
}
int getSizes(int u, int p) {
  sz[u] = 1;
  for (auto v : G[u])
    if (!block[v] && v != p) sz[u] += getSizes(v, u);
  return sz[u];
}
int centroid(int u) {
  int half = getSizes(u, u) / 2;
  bool change = true;
  while (change) {
    change = false;
    for (auto v : G[u])
      if (!block[v] && sz[v] < sz[u] && sz[v] >= half) {
        u = v;
        change = true;
        break;
      }
  }
  return u;
}
void go(int u, int p, int d) {
  if (spec[u]) {
    int t = Find(u);
    colors.push_back(t);
    dists[t] = min(dists[t], d);
  }
  for (auto v : G[u])
    if (!block[v] && v != p) go(v, u, d + 1);
}
void ask(int u, int p, int d) {
  for (auto v : req[u]) {
    if (d + dists[v.first] > k) continue;
    if (v.second < 0)
      ans[-v.second] |= 2;
    else
      ans[v.second] |= 1;
  }
  for (auto v : G[u])
    if (!block[v] && v != p) ask(v, u, d + 1);
}
void Decompose(int u) {
  u = centroid(u);
  block[u] = true;
  go(u, u, 0);
  ask(u, u, 0);
  for (auto c : colors) dists[c] = N;
  colors.clear();
  for (auto v : G[u])
    if (!block[v]) Decompose(v);
}
int main() {
  scanf("%d %d %d", &n, &k, &r);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= r; ++i) {
    int t;
    scanf("%d", &t);
    spec[t] = true;
  }
  prepare();
  scanf("%d", &q);
  for (int i = 1; i <= q; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    consider(u, v, i);
  }
  for (int i = 1; i <= n; ++i) dists[i] = N;
  Decompose(1);
  for (int i = 1; i <= q; ++i) puts((ans[i] == 3) ? "YES" : "NO");
  return 0;
}