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;
using namespace chrono;
int setBit(int n, int x) { return n | (1 << x); }
int clearBit(int n, int x) { return n & ~(1 << x); }
int toggleBit(int n, int x) { return n ^ (1 << x); }
bool checkBit(int n, int x) { return (bool)(n & (1 << x)); }
int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy8[] = {0, 1, 1, 1, 0, -1, -1, -1};
int dx4[] = {1, 0, -1, 0};
int dy4[] = {0, 1, 0, -1};
void yes() { cout << "YES" << endl; }
void no() { cout << "NO" << endl; }
template <typename T>
void amax(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void amin(T& t1, T t2) {
  t1 = min(t1, t2);
}
void _print(long long t) { cerr << t; }
void _print(int t) { cerr << t; }
void _print(string t) { cerr << t; }
void _print(char t) { cerr << t; }
void _print(long double t) { cerr << t; }
void _print(double t) { cerr << t; }
void _print(unsigned long long t) { cerr << t; }
template <class T, class V>
void _print(pair<T, V> p);
template <class T>
void _print(vector<T> v);
template <class T>
void _print(set<T> v);
template <class T, class V>
void _print(map<T, V> v);
template <class T>
void _print(multiset<T> v);
template <class T, class V>
void _print(pair<T, V> p) {
  cerr << "{";
  _print(p.first);
  cerr << ",";
  _print(p.second);
  cerr << "}";
}
template <class T>
void _print(vector<T> v) {
  cerr << "[ ";
  for (T i : v) {
    _print(i);
    cerr << " ";
  }
  cerr << "]";
}
template <class T>
void _print(set<T> v) {
  cerr << "[ ";
  for (T i : v) {
    _print(i);
    cerr << " ";
  }
  cerr << "]";
}
template <class T>
void _print(multiset<T> v) {
  cerr << "[ ";
  for (T i : v) {
    _print(i);
    cerr << " ";
  }
  cerr << "]";
}
template <class T, class V>
void _print(map<T, V> v) {
  cerr << "[ ";
  for (auto i : v) {
    _print(i);
    cerr << " ";
  }
  cerr << "]";
}
long long binpow(long long a, long long b, long long m) {
  long long ans = 1;
  a %= m;
  while (b) {
    if (b & 1) ans = (ans * a);
    b /= 2;
    a = (a * a);
    ans %= m;
    a %= m;
  }
  return ans;
}
struct cmp {
  bool operator()(pair<long long, long long> a, pair<long long, long long> b) {
    return ((a.first - a.first / 2) * a.second) >
           ((b.first - b.first / 2) * b.second);
  }
};
const int N = 1e5 + 5;
vector<int> g[N];
int up[N][24];
int lvl[N];
int n, q;
int T;
void fill_lvl(int src, int p) {
  if (src != p) lvl[src] = lvl[p] + 1;
  for (auto e : g[src]) {
    if (e == p) continue;
    fill_lvl(e, src);
  }
  return;
}
void binary_lifting(int src, int p) {
  up[src][0] = p;
  for (int i = 1; i < 20; i++) {
    up[src][i] = -1;
    if (up[src][i - 1] != -1) {
      up[src][i] = up[up[src][i - 1]][i - 1];
    }
  }
  for (auto e : g[src]) {
    if (e == p) continue;
    binary_lifting(e, src);
  }
  return;
}
int lift_node(int src, int jump) {
  int node = src;
  for (int i = 19; i >= 0; i--) {
    int mask = (1 << i);
    if (mask & jump) {
      node = up[node][i];
    }
    if (node == -1) break;
  }
  return node;
}
int LCA(int u, int v) {
  if (lvl[u] < lvl[v]) swap(u, v);
  u = lift_node(u, lvl[u] - lvl[v]);
  if (u == v) return u;
  for (int i = 19; i >= 0; i--) {
    if (up[u][i] != up[v][i]) {
      u = up[u][i];
      v = up[v][i];
    }
  }
  return lift_node(u, 1);
}
int dist(int a, int b) {
  int lca = LCA(a, b);
  return lvl[a] + lvl[b] - 2 * lvl[lca];
}
void JAI_MAHAKAL() {
  cin >> n;
  int x, y, a, b, k;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  cin >> q;
  fill_lvl(1, 1);
  binary_lifting(1, -1);
  while (q--) {
    cin >> x >> y >> a >> b >> k;
    int op1 = dist(a, b);
    int op2 = dist(a, x) + dist(y, b) + 1;
    int op3 = dist(a, y) + dist(x, b) + 1;
    int ok = 0;
    if (op1 % 2 == k % 2 and op1 <= k) ok = 1;
    if (op2 % 2 == k % 2 and op2 <= k) ok = 1;
    if (op3 % 2 == k % 2 and op3 <= k) ok = 1;
    if (ok)
      yes();
    else
      no();
  }
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) JAI_MAHAKAL();
  cerr << "Time elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
