#include <bits/stdc++.h>
using namespace std;
int p[100];
int r[100];
bool used[100];
int get(int x) {
  if (p[x] != x) p[x] = get(p[x]);
  return p[x];
}
void unite(int x, int y) {
  x = get(x);
  y = get(y);
  if (x == y) return;
  if (r[x] > r[y]) {
    r[y] = r[x];
    p[y] = x;
  } else if (r[x] < r[y]) {
    r[x] = r[y];
    p[x] = y;
  } else {
    r[x]++;
    p[y] = x;
  }
}
int n, l;
vector<vector<int> > g;
vector<int> tin, tout;
int timer;
vector<vector<int> > up;
vector<int> fromroot(1e5);
void dfs(int v, int p = 0, int d = 0) {
  tin[v] = ++timer;
  fromroot[v] = d;
  up[v][0] = p;
  for (int i = 1; i <= l; ++i) up[v][i] = up[up[v][i - 1]][i - 1];
  for (size_t i = 0; i < g[v].size(); ++i) {
    int to = g[v][i];
    if (to != p) dfs(to, v, d + 1);
  }
  tout[v] = ++timer;
}
bool upper(int a, int b) { return tin[a] <= tin[b] && tout[a] >= tout[b]; }
int lca(int a, int b) {
  if (upper(a, b)) return a;
  if (upper(b, a)) return b;
  for (int i = l; i >= 0; --i)
    if (!upper(up[a][i], b)) a = up[a][i];
  return up[a][0];
}
int get_dist(int a, int b) {
  int kek = lca(a, b);
  return fromroot[a] + fromroot[b] - 2 * fromroot[kek];
}
int main() {
  cin >> n;
  g.resize(n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  tin.resize(n), tout.resize(n), up.resize(n);
  l = 1;
  while ((1 << l) <= n) ++l;
  for (int i = 0; i < n; ++i) up[i].resize(l + 1);
  dfs(0);
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    x--;
    y--;
    a--;
    b--;
    int ax = get_dist(a, x), ay = get_dist(a, y), xb = get_dist(x, b),
        yb = get_dist(y, b), ab = get_dist(a, b);
    if (k % 2 == 0 &&
        (ab % 2 == 0 || (ax + yb + 1) % 2 == 0 && k - ax - yb >= 0 ||
         (ay + xb + 1) % 2 == 0 && k - ay - xb >= 0)) {
      cout << "YES" << endl;
      continue;
    }
    if (k % 2 == 1 &&
        (ab % 2 == 1 || (ax + yb + 1) % 2 == 1 && k - ax - yb >= 0 ||
         (ay + xb + 1) % 2 == 1 && k - ay - xb >= 0)) {
      cout << "YES" << endl;
      continue;
    }
    cout << "NO" << endl;
  }
}
