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;
const int N = 1e5 + 9;
const int mod = 1e9 + 7;
vector<int> g[N];
int par[N][20], dep[N], sz[N], st[N], en[N], T;
void dfs(int u, int pre) {
  par[u][0] = pre;
  dep[u] = dep[pre] + 1;
  st[u] == ++T;
  sz[u] = 1;
  for (int i = 1; i <= 18; i++) par[u][i] = par[par[u][i - 1]][i - 1];
  for (auto v : g[u]) {
    if (v == pre) continue;
    dfs(v, u);
    sz[u] += sz[v];
  }
  en[u] = T;
}
int lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  for (int k = 18; k >= 0; k--)
    if (dep[par[u][k]] >= dep[v]) u = par[u][k];
  if (u == v) return u;
  for (int k = 18; k >= 0; k--)
    if (par[u][k] != par[v][k]) u = par[u][k], v = par[v][k];
  return par[u][0];
}
int kth(int u, int k) {
  assert(k >= 0);
  for (int i = 0; i <= 18; i++)
    if (k & (1 << i)) u = par[u][i];
  return u;
}
int dist(int u, int v) {
  int lc = lca(u, v);
  return dep[u] + dep[v] - 2 * dep[lc];
}
int isanc(int u, int v) { return st[u] <= st[v] && en[v] <= en[u]; }
int nearest(int u, int v, int x) {
  int lc = lca(u, v);
  int d = dist(u, lc);
  int l = 0, r = d, ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (isanc(kth(u, mid), x)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (ans != -1) return kth(u, ans);
  l = 0, r = dist(v, lc), ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (isanc(kth(v, mid), x)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (ans != -1) return kth(v, ans);
  return lc;
}
int32_t main() {
  int n = ({
    int a;
    scanf("%d", &a);
    a;
  });
  for (int i = 1; i < n; i++) {
    int u = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        v = ({
          int a;
          scanf("%d", &a);
          a;
        });
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  dfs(1, 0);
  int q = ({
    int a;
    scanf("%d", &a);
    a;
  });
  while (q--) {
    int x = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        y = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        u = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        v = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        k = ({
          int a;
          scanf("%d", &a);
          a;
        });
    int ans = 0;
    int d = dist(u, v);
    if (d <= k && d % 2 == k % 2) ans = 1;
    int p = nearest(x, y, u), q = nearest(x, y, v);
    int trial = dist(u, p) + dist(p, q) + dist(q, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, p) + dist(x, y) + 1 - dist(p, q) + dist(q, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(p, q) + dist(p, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(x, y) + 1 - dist(p, q) + dist(p, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, x) + dist(x, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, y) + dist(x, y) + dist(x, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, x) + 1 + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, y) + 1 + dist(x, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, p) + dist(p, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(q, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(v, p) + dist(p, x) + dist(x, u);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(v, q) + dist(q, x) + dist(x, u);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    if (ans)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
