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 double PI = acos(-1.0);
namespace IO {
bool REOF = 1;
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && REOF &&
                 (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? (REOF = 0, EOF)
             : *p1++;
}
template <class T>
inline bool read(T &x) {
  if (!REOF) return false;
  char c = nc();
  bool f = 0;
  x = 0;
  while (c < '0' || c > '9') c == '-' && (f = 1), c = nc();
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = nc();
  if (f) x = -x;
  return true;
}
template <typename T, typename... T2>
inline bool read(T &x, T2 &...rest) {
  if (!REOF) return false;
  read(x);
  return read(rest...);
}
inline bool need(char &c) {
  return ((c >= 'a') && (c <= 'z')) || ((c >= '0') && (c <= '9')) ||
         ((c >= 'A') && (c <= 'Z'));
}
inline bool read_str(char *a) {
  if (!REOF) return false;
  while ((*a = nc()) && need(*a) && REOF) ++a;
  *a = '\0';
  return true;
}
inline bool read_dbl(double &x) {
  if (!REOF) return false;
  bool f = 0;
  char ch = nc();
  x = 0;
  while (ch < '0' || ch > '9') {
    f |= (ch == '-');
    ch = nc();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10.0 + (ch ^ 48);
    ch = nc();
  }
  if (ch == '.') {
    double tmp = 1;
    ch = nc();
    while (ch >= '0' && ch <= '9') {
      tmp = tmp / 10.0;
      x = x + tmp * (ch ^ 48);
      ch = nc();
    }
  }
  if (f) x = -x;
  return true;
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << '\n';
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',' << ' ';
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}
}  // namespace IO
using namespace IO;
const int maxn = 1e5 + 5;
const int mod = 998244353;
const int INF = 1e9 + 7;
const double eps = 1e-12;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
struct edge {
  int v, nxt;
} e[maxn << 1];
int n, q, head[maxn], tot = 1;
void addedge(int u, int v) {
  e[tot] = (edge){v, head[u]};
  head[u] = tot++;
  e[tot] = (edge){u, head[v]};
  head[v] = tot++;
}
int sz[maxn], son[maxn], fa[maxn], h[maxn], top[maxn], cnt;
void dfs1(int u, int f) {
  sz[u] = 1;
  son[u] = 0;
  fa[u] = f;
  h[u] = h[f] + 1;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == f) continue;
    dfs1(v, u);
    sz[u] += sz[v];
    if (sz[son[u]] < sz[v]) son[u] = v;
  }
}
void dfs2(int u, int f, int k) {
  top[u] = k;
  if (son[u]) dfs2(son[u], u, k);
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == f || v == son[u]) continue;
    dfs2(v, u, v);
  }
}
int LCA(int u, int v) {
  while (top[u] != top[v]) {
    if (h[top[u]] < h[top[v]]) swap(u, v);
    u = fa[top[u]];
  }
  if (h[u] > h[v]) swap(u, v);
  return u;
}
void solve() {
  read(n);
  int u, v;
  for (int i = 1; i <= n - 1; i++) {
    read(u, v);
    addedge(u, v);
  }
  dfs1(1, 0);
  dfs2(1, 0, 1);
  read(q);
  int x, y, a, b, k;
  while (q--) {
    read(x, y, a, b, k);
    bool flag = false;
    int ab = LCA(a, b);
    int dab = h[a] + h[b] - 2 * h[ab];
    if (dab <= k && (k - dab) % 2 == 0) flag = true;
    int ax = LCA(a, x);
    int dax = h[a] + h[x] - 2 * h[ax];
    int by = LCA(b, y);
    int dby = h[b] + h[y] - 2 * h[by];
    int daxyb = dax + 1 + dby;
    if (daxyb <= k && (k - daxyb) % 2 == 0) flag = true;
    int ay = LCA(a, y);
    int day = h[a] + h[y] - 2 * h[ay];
    int bx = LCA(b, x);
    int dbx = h[b] + h[x] - 2 * h[bx];
    int dayxb = day + 1 + dbx;
    if (dayxb <= k && (k - dayxb) % 2 == 0) flag = true;
    puts(flag ? "YES" : "NO");
  }
}
int main() {
  solve();
  return 0;
}
