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>
std::vector<int> euler, height, first, seg_tree;
std::vector<std::vector<int> > adj;
std::vector<bool> seen;
int nodes, m;
void dfs(int v, int h) {
  seen[v] = true, height[v] = h;
  first[v] = euler.size(), euler.push_back(v);
  for (auto u : adj[v])
    if (!seen[u]) dfs(u, h + 1), euler.push_back(v);
}
void setup_seg(int v, int l, int r) {
  if (l == r)
    seg_tree[v] = euler[l];
  else {
    int mid = (l + r) / 2, a, b;
    setup_seg(v * 2, l, mid);
    setup_seg(v * 2 + 1, mid + 1, r);
    a = seg_tree[v * 2], b = seg_tree[v * 2 + 1];
    seg_tree[v] = (height[a] < height[b] ? a : b);
  }
}
int query(int n, int t_l, int t_r, int l, int r) {
  if (l > r) return -1;
  if (l == t_l && r == t_r) return height[seg_tree[n]];
  int mid = (t_l + t_r) / 2;
  int left = query(n * 2, t_l, mid, l, std::min(r, mid));
  int right = query(n * 2 + 1, mid + 1, t_r, std::max(l, mid + 1), r);
  if (left == -1) return right;
  if (right == -1) return left;
  return std::min(left, right);
}
void setup() {
  height.resize(nodes), first.resize(nodes), seen.resize(nodes);
  dfs(0, 0), m = euler.size(), seg_tree.resize(4 * m);
  setup_seg(1, 0, m - 1);
}
int dist(int u, int v) {
  int h_u, h_v, h_lca;
  if (first[u] > first[v]) std::swap(u, v);
  h_u = height[u], h_v = height[v];
  h_lca = query(1, 0, m - 1, first[u], first[v]);
  return h_u - h_lca + h_v - h_lca;
}
bool possible(int dist, int k) { return (dist <= k && dist % 2 == k % 2); }
int main() {
  std::cin >> nodes;
  adj.resize(nodes);
  for (int i = 0, u, v; i < nodes - 1; i++) {
    std::cin >> u >> v;
    adj[u - 1].push_back(v - 1);
    adj[v - 1].push_back(u - 1);
  }
  setup();
  int con_a, con_b, u, v, k, q;
  int d, d_with_a, d_with_b;
  std::cin >> q;
  while (q--) {
    std::cin >> con_a >> con_b >> u >> v >> k;
    con_a--, con_b--, u--, v--;
    d = dist(u, v);
    d_with_a = dist(u, con_a) + dist(con_b, v) + 1;
    d_with_b = dist(u, con_b) + dist(con_a, v) + 1;
    if (possible(d, k) || possible(d_with_a, k) || possible(d_with_b, k))
      std::cout << "YES"
                << "\n";
    else
      std::cout << "NO"
                << "\n";
  }
}
