Gildong was hiking a mountain, walking by millions of trees. Inspired by them, he suddenly came up with an interesting idea for trees in data structures: What if we add another edge in a tree?

Then he found that such tree-like graphs are called 1-trees. Since Gildong was bored of solving too many tree problems, he wanted to see if similar techniques in trees can be used in 1-trees as well. Instead of solving it by himself, he's going to test you by providing queries on 1-trees.

First, he'll provide you a tree (not 1-tree) with n vertices, then he will ask you q queries. Each query contains 5 integers: x, y, a, b, and k. This means you're asked to determine if there exists a path from vertex a to b that contains exactly k edges after adding a bidirectional edge between vertices x and y. A path can contain the same vertices and same edges multiple times. All queries are independent of each other; i.e. the added edge in a query is removed in the next query.

Input

The first line contains an integer n (3 ≤ n ≤ 10^5), the number of vertices of the tree.

Next n-1 lines contain two integers u and v (1 ≤ u,v ≤ n, u ≠ v) each, which means there is an edge between vertex u and v. All edges are bidirectional and distinct.

Next line contains an integer q (1 ≤ q ≤ 10^5), the number of queries Gildong wants to ask.

Next q lines contain five integers x, y, a, b, and k each (1 ≤ x,y,a,b ≤ n, x ≠ y, 1 ≤ k ≤ 10^9) – the integers explained in the description. It is guaranteed that the edge between x and y does not exist in the original tree.

Output

For each query, print "YES" if there exists a path that contains exactly k edges from vertex a to b after adding an edge between vertices x and y. Otherwise, print "NO".

You can print each letter in any case (upper or lower).

Example

Input


5
1 2
2 3
3 4
4 5
5
1 3 1 2 2
1 4 1 3 2
1 4 1 3 3
4 2 3 3 9
5 2 3 3 9


Output


YES
YES
NO
YES
NO

Note

The image below describes the tree (circles and solid lines) and the added edges for each query (dotted lines).

<image>

Possible paths for the queries with "YES" answers are: 

  * 1-st query: 1 – 3 – 2 
  * 2-nd query: 1 – 2 – 3 
  * 4-th query: 3 – 4 – 2 – 3 – 4 – 2 – 3 – 4 – 2 – 3 
#include <bits/stdc++.h>
using namespace std;
string FILENAME = "filename";
unordered_map<int, unordered_set<int>> G;
unordered_map<int, int> mapper;
unordered_map<int, int> id;
int dpth[100001];
void preorder(unordered_map<int, unordered_set<int>> G) {
  deque<pair<int, int>> S;
  unordered_set<int> VST;
  S.push_back(make_pair(1, 0));
  while (!S.empty()) {
    pair<int, int> V = S.front();
    S.pop_front();
    VST.insert(V.first);
    dpth[V.first] = V.second;
    for (int NB : G[V.first]) {
      if (VST.count(NB)) continue;
      S.push_back(make_pair(NB, V.second + 1));
    }
  }
}
vector<int> treetrav(unordered_map<int, unordered_set<int>> G) {
  vector<int> R(2 * G.size() - 1);
  unordered_map<int, int> VST;
  stack<int> S;
  S.push(1);
  int I = 0;
  while (!S.empty()) {
    int V = S.top();
    S.pop();
    if (VST.count(V)) {
      R[I++] = VST[V];
      continue;
    }
    VST[V] = I;
    R[I++] = VST[V];
    for (int NB : G[V]) {
      if (VST.count(NB)) continue;
      S.push(V);
      S.push(NB);
    }
  }
  mapper = VST;
  return R;
}
struct SegTree {
  vector<int> T, REF;
  int SZ;
  SegTree(vector<int> A) {
    SZ = A.size();
    T.resize(SZ * 4);
    REF = A;
    build(0, 0, SZ - 1);
  }
  int build(int V, int L, int R) {
    if (L == R) return T[V] = REF[L];
    return T[V] = min(build(V * 2 + 1, L, (L + R) / 2),
                      build(V * 2 + 2, (L + R) / 2 + 1, R));
  }
  int value(int L, int R) { return value(0, 0, SZ - 1, L, R); }
  int value(int ND, int SL, int SR, int L, int R) {
    if (SR < L || SL > R)
      return INT_MAX;
    else if (L <= SL && R >= SR)
      return T[ND];
    return min(value(ND * 2 + 1, SL, (SL + SR) / 2, L, R),
               value(ND * 2 + 2, (SL + SR) / 2 + 1, SR, L, R));
  }
  void update(int I, int V) { update(0, 0, SZ - 1, I, V); }
  int update(int ND, int SL, int SR, int I, int V) {
    if (I < SL || I > SR) return T[ND];
    if (SL == SR) return T[ND] = V;
    return T[ND] = min(update(ND * 2 + 1, SL, (SL + SR) / 2, I, V),
                       update(ND * 2 + 2, (SL + SR) / 2 + 1, SR, I, V));
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    G[a].insert(b);
    G[b].insert(a);
  }
  preorder(G);
  vector<int> thingy = treetrav(G);
  for (auto it : mapper) id[it.second] = it.first;
  SegTree LK(thingy);
  int q;
  cin >> q;
  for (int _ = 0; _ < q; _++) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int LCA =
        id[LK.value(min(mapper[a], mapper[b]), max(mapper[a], mapper[b]))];
    int pathl = -2 * dpth[LCA] + dpth[a] + dpth[b];
    if (pathl <= k and k % 2 == pathl % 2) {
      cout << "YES" << endl;
      continue;
    }
    int LCA2 =
        id[LK.value(min(mapper[a], mapper[x]), max(mapper[a], mapper[x]))];
    int LCA3 =
        id[LK.value(min(mapper[y], mapper[b]), max(mapper[y], mapper[b]))];
    int pathl2 = -2 * dpth[LCA2] + dpth[a] + dpth[x];
    int pathl3 = -2 * dpth[LCA3] + dpth[y] + dpth[b];
    if (pathl2 + pathl3 + 1 <= k and (pathl2 + pathl3 + 1) % 2 == k % 2) {
      cout << "YES" << endl;
      continue;
    }
    LCA2 = id[LK.value(min(mapper[b], mapper[x]), max(mapper[b], mapper[x]))];
    LCA3 = id[LK.value(min(mapper[y], mapper[a]), max(mapper[y], mapper[a]))];
    pathl2 = -2 * dpth[LCA2] + dpth[b] + dpth[x];
    pathl3 = -2 * dpth[LCA3] + dpth[y] + dpth[a];
    if (pathl2 + pathl3 + 1 <= k and (pathl2 + pathl3 + 1) % 2 == k % 2) {
      cout << "YES" << endl;
      continue;
    }
    cout << "NO" << endl;
  }
}
