#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
vector<int> G[N];
int pos[N], dep[N], rmq[22][2 * N], cur, n;
void dfs(int u, int fa = 0) {
  dep[u] = dep[fa] + 1;
  pos[u] = ++cur;
  rmq[0][cur] = u;
  for (int v : G[u])
    if (v != fa) {
      dfs(v, u);
      rmq[0][++cur] = u;
    }
}
int Min(int x, int y) { return dep[x] < dep[y] ? x : y; }
void rmq_init() {
  for (int l = 1, j = 1; l <= cur; l <<= 1, j++)
    for (int i = 1; i + (l << 1) - 1 <= cur; i++)
      rmq[j][i] = Min(rmq[j - 1][i], rmq[j - 1][i + l]);
}
void init() {
  dfs(1);
  rmq_init();
}
int lca(int x, int y) {
  x = pos[x], y = pos[y];
  if (x > y) swap(x, y);
  int logl = log2(y - x + 1);
  int l = 1 << logl;
  return Min(rmq[logl][x], rmq[logl][y - l + 1]);
}
int query(int x, int y) { return dep[x] + dep[y] - 2 * dep[lca(x, y)]; };
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  init();
  int q;
  scanf("%d", &q);
  while (q--) {
    int c, d, a, b, k;
    scanf("%d%d%d%d%d", &c, &d, &a, &b, &k);
    int t = query(a, b);
    if (t <= k && (k % 2 == t % 2)) {
      printf("YES\n");
      continue;
    }
    int s = query(a, c) + 1 + query(d, b);
    if (s <= k && (s % 2 == k % 2)) {
      printf("YES\n");
      continue;
    }
    int r = query(a, d) + 1 + query(c, b);
    if (r <= k && (r % 2 == k % 2)) {
      printf("YES\n");
      continue;
    }
    printf("NO\n");
  }
  return 0;
}
