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;
int ri() {
  int x;
  if (scanf(" %d", &x) == EOF) return -1;
  return x;
}
long long int rl() {
  long long int x;
  if (cin >> x) return x;
  return -1;
}
string rs() {
  string s;
  if (cin >> s) return s;
  return "";
}
struct Minimum {
  int x;
  static const int INF = (1 << 29);
  Minimum(int x) : x(x) {}
  Minimum() : x(INF) {}
  static Minimum identity() { return Minimum(INF); }
  static Minimum make(const int& x) { return Minimum(x); }
  static Minimum combine(Minimum a, Minimum b) {
    return Minimum(min(a.x, b.x));
  }
  void print() { printf("{Minimum = %lld}", x); }
};
template <typename Data, typename Input>
class SegmentTree {
 private:
  int n;
  vector<Data> dv;

 public:
  SegmentTree(const vector<Input>& input) {
    n = input.size();
    int vectorSize = 1;
    while (vectorSize < n) {
      vectorSize *= 2;
    }
    vectorSize *= 2;
    dv = vector<Data>(vectorSize, Data::identity());
    build(input, 0, 0, n);
  }
  void update(int x, Input& val) { update(x, val, 0, 0, n); }
  void update(int left, int right, Input& val) { assert(false); }
  Data query(int left, int right) {
    assert(left >= 0 && right <= n);
    return query(0, 0, n, left, right);
  }
  void print() {
    printf("Tree size for n = %d is %d\n", n, dv.size());
    for (auto& d : dv) {
      d.print();
      cout << " ";
    }
    cout << endl;
  }

 private:
  Data query(int root, int tl, int tr, int l, int r) {
    if (l >= r) {
      return Data::identity();
    }
    if (l == tl && r == tr) {
      return dv[root];
    }
    int tm = (tl + tr + 1) / 2;
    Data left = query(2 * root + 1, tl, tm, l, min(r, tm));
    Data right = query(2 * root + 2, tm, tr, max(tm, l), r);
    return Data::combine(left, right);
  }
  void update(int x, Input& val, int root, int tl, int tr) {
    if (tl == tr - 1) {
      dv[root] = Data::make(val);
      return;
    }
    int tm = (tl + tr + 1) / 2;
    if (x < tm)
      update(x, val, 2 * root + 1, tl, tm);
    else
      update(x, val, 2 * root + 2, tm, tr);
    dv[root] = Data::combine(dv[2 * root + 1], dv[2 * root + 2]);
  }
  Data build(const vector<Input>& values, int root, int tl, int tr) {
    if (tl == tr - 1) {
      return dv[root] = Data::make(values[tl]);
    }
    int tm = (tl + tr + 1) / 2;
    Data left = build(values, 2 * root + 1, tl, tm);
    Data right = build(values, 2 * root + 2, tm, tr);
    return dv[root] = Data::combine(left, right);
  }
};
struct Tree {
  int n;
  SegmentTree<Minimum, int> lcaTree;
  vector<vector<int> > edges;
  vector<int> firstPos;
  vector<int> heights;
  Tree(int n) : n(n), lcaTree(vector<int>(1, 1)), edges(n), firstPos(n, -1) {}
  void readInput() {
    for (int i = 0; i < n; ++i)
      if (i) {
        int u = ri() - 1;
        int v = ri() - 1;
        edges[u].push_back(v);
        edges[v].push_back(u);
      }
  }
  void solveQueries() {
    int q = ri();
    for (int i = 0; i < q; ++i) {
      int nu = ri() - 1;
      int nv = ri() - 1;
      int a = ri() - 1;
      int b = ri() - 1;
      int K = ri();
      solveQuery(nu, nv, a, b, K);
    }
  }
  int d(int u, int v) {
    int fu = firstPos[u], fv = firstPos[v];
    if (fu > fv) swap(fu, fv);
    int hu = heights[fu], hv = heights[fv];
    int hc = lcaTree.query(fu, fv + 1).x;
    int ret = (hu - hc) + (hv - hc);
    return ret;
  }
  void solveQuery(int nu, int nv, int a, int b, int K) {
    int p1 = d(a, b);
    int p2 = d(a, nu) + 1 + d(nv, b);
    int p3 = d(a, nv) + 1 + d(nu, b);
    vector<int> temp = {p1, p2, p3};
    assert(temp.size() == 3);
    vector<int> D(2, 1000000009);
    for (auto x : temp) {
      if (x < D[x % 2]) D[x % 2] = x;
    }
    bool possible = (K >= D[K % 2]);
    string ret = possible ? "YES" : "NO";
    cout << ret << endl;
  }
  void precompute() {
    doit(0, -1, 0, heights);
    lcaTree = {heights};
  }
  void doit(int u, int parent, int h, vector<int>& heights) {
    if (firstPos[u] < 0) firstPos[u] = heights.size();
    heights.push_back(h);
    for (auto v : edges[u])
      if (v != parent) {
        doit(v, u, h + 1, heights);
        heights.push_back(h);
      }
  }
};
struct SingleCase {
  int n;
  bool solveCase() {
    n = ri();
    if (n < 0) return false;
    Tree tree(n);
    tree.readInput();
    tree.precompute();
    tree.solveQueries();
    return true;
  }
};
int main() {
  while (SingleCase().solveCase()) {
  };
  return 0;
}
