#include <bits/stdc++.h>
using namespace std;
struct node {
  int next, to;
} e[200005];
int fa[100005][18], head[100005], dep[100005], lg[100005], g;
int read() {
  int A;
  bool K;
  char C;
  C = A = K = 0;
  while (C < '0' || C > '9') K |= C == '-', C = getchar();
  while (C > '/' && C < ':') A = (A << 3) + (A << 1) + (C ^ 48), C = getchar();
  return (K ? -A : A);
}
void write(int X) {
  if (X < 0) putchar('-'), X = -X;
  if (X > 9) write(X / 10);
  putchar(X % 10 | 48);
}
inline void sw_ap(int& _, int& __) { _ ^= __ ^= _ ^= __; }
inline void add(int u, int v) {
  e[++g].to = v;
  e[g].next = head[u];
  head[u] = g;
}
void build(int now, int t) {
  int i = 0, v;
  fa[now][0] = t;
  dep[now] = dep[t] + 1;
  while (1 << ++i <= dep[now]) fa[now][i] = fa[fa[now][i - 1]][i - 1];
  for (i = head[now]; i; i = e[i].next) {
    v = e[i].to;
    if (v != t) build(v, now);
  }
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) sw_ap(x, y);
  while (dep[x] > dep[y]) x = fa[x][lg[dep[x] - dep[y]]];
  if (x == y) return x;
  int i;
  for (i = lg[dep[x]]; i >= 0; i--)
    if (fa[x][i] != fa[y][i]) x = fa[x][i], y = fa[y][i];
  return fa[y][0];
}
int main() {
  int n, m, i, x, y, tmp1, tmp2, k, pp, q, a, b;
  n = read();
  for (i = 1; i <= n - 1; i++) {
    x = read(), y = read();
    add(x, y), add(y, x);
  }
  build(1, 0);
  lg[0] = -1;
  for (i = 1; i <= n; i++) lg[i] = lg[i >> 1] + 1;
  q = read();
  while (q--) {
    x = read(), y = read();
    a = read(), b = read(), k = read();
    tmp1 = lca(a, b);
    pp = dep[a] - dep[tmp1] + dep[b] - dep[tmp1];
    if (pp <= k && (pp & 1) == (k & 1)) {
      puts("YES");
      continue;
    }
    tmp1 = lca(a, x), tmp2 = lca(b, y);
    pp = dep[a] - dep[tmp1] + dep[x] - dep[tmp1] + dep[b] - dep[tmp2] + dep[y] -
         dep[tmp2] + 1;
    if ((pp & 1) == (k & 1) && pp <= k) {
      puts("YES");
      continue;
    }
    tmp1 = lca(a, y), tmp2 = lca(b, x);
    pp = dep[a] - dep[tmp1] + dep[y] - dep[tmp1] + dep[b] - dep[tmp2] + dep[x] -
         dep[tmp2] + 1;
    if ((pp & 1) == (k & 1) && pp <= k) {
      puts("YES");
      continue;
    }
    puts("NO");
  }
  return 0;
}
