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;
struct A {
  int nod, nvl;
};
queue<int> q;
vector<int> v[100005], rmq[18];
A Repr_Euler[200005];
int nr;
int nivel[100005], prima_aparitie[100005];
void nivelare();
void dfs(int nod);
int distanta(int nod1, int nod2);
int main() {
  int n, i, j, q, x, y, a, b, k, D1, D2, D3;
  cin >> n;
  for (i = 1; i < n; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  nivelare();
  dfs(1);
  n = 2 * n - 1;
  x = log2(n);
  for (i = 1; i <= n; i++) rmq[0].push_back(Repr_Euler[i].nvl);
  for (i = 1; i <= x; i++)
    for (j = 0; j < n - (1 << i) + 1; j++)
      rmq[i].push_back(min(rmq[i - 1][j], rmq[i - 1][j + (1 << (i - 1))]));
  cin >> q;
  while (q--) {
    cin >> x >> y >> a >> b >> k;
    D1 = distanta(a, b);
    D2 = 1 + distanta(a, x) + distanta(y, b);
    D3 = 1 + distanta(a, y) + distanta(x, b);
    if (D1 <= k && D1 % 2 == k % 2)
      cout << "YES" << '\n';
    else if (D2 <= k && D2 % 2 == k % 2)
      cout << "YES" << '\n';
    else if (D3 <= k && D3 % 2 == k % 2)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
void nivelare() {
  int x, i;
  nivel[1] = 1;
  q.push(1);
  while (q.empty() == 0) {
    x = q.front();
    q.pop();
    for (i = 0; i < v[x].size(); i++)
      if (nivel[v[x][i]] == 0) {
        nivel[v[x][i]] = nivel[x] + 1;
        q.push(v[x][i]);
      }
  }
}
void dfs(int nod) {
  int i;
  for (i = 0; i < v[nod].size(); i++)
    if (nivel[nod] == nivel[v[nod][i]] - 1) {
      Repr_Euler[++nr].nod = nod;
      Repr_Euler[nr].nvl = nivel[nod];
      if (prima_aparitie[nod] == 0) prima_aparitie[nod] = nr;
      dfs(v[nod][i]);
    }
  Repr_Euler[++nr].nod = nod;
  Repr_Euler[nr].nvl = nivel[nod];
  if (prima_aparitie[nod] == 0) prima_aparitie[nod] = nr;
}
int distanta(int nod1, int nod2) {
  int st, dr, x, val, a, b;
  st = prima_aparitie[nod1] - 1;
  dr = prima_aparitie[nod2] - 1;
  if (st > dr) swap(st, dr);
  x = log2(dr - st + 1);
  a = rmq[x][st];
  b = rmq[x][dr - (1 << x) + 1];
  val = min(rmq[x][st], rmq[x][dr - (1 << x) + 1]);
  return nivel[nod1] + nivel[nod2] - 2 * val;
}
