#include <bits/stdc++.h>
using namespace std;
const int t = 20;
int N, M, deep[int(3e5 + 5)], f[int(3e5 + 5)][t + 5];
int tot, nt[int(3e5 + 5)], hd[int(3e5 + 5)], ver[int(3e5 + 5)];
inline void read(int &x) {
  x = 0;
  bool f = 0;
  char ch = getchar();
  for (; !(ch >= '0' && ch <= '9'); ch = getchar()) f |= ch == '-';
  for (; (ch >= '0' && ch <= '9'); ch = getchar())
    x = (x << 3) + (x << 1) + (ch ^ 48);
  x = f ? -x : x;
}
inline void addedge(int x, int y) {
  ++tot;
  nt[tot] = hd[x];
  ver[tot] = y;
  hd[x] = tot;
}
void Dfs(int x) {
  for (int i = hd[x]; i; i = nt[i]) {
    int y = ver[i];
    if (f[x][0] == y) continue;
    f[y][0] = x;
    deep[y] = deep[x] + 1;
    for (int i = 1; i <= t; ++i) f[y][i] = f[f[y][i - 1]][i - 1];
    Dfs(y);
  }
}
inline int lca(int x, int y) {
  if (deep[x] > deep[y]) swap(x, y);
  for (int i = t; i >= 0; --i)
    if (deep[f[y][i]] >= deep[x]) y = f[y][i];
  if (x == y) return x;
  for (int i = t; i >= 0; --i)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
inline int cnt(int x, int y) { return deep[x] + deep[y] - 2 * deep[lca(x, y)]; }
int main() {
  read(N);
  for (int i = 1; i < N; ++i) {
    int x, y;
    read(x);
    read(y);
    addedge(x, y);
    addedge(y, x);
  }
  Dfs(1);
  read(M);
  for (int i = 1; i <= M; ++i) {
    int f = 0, x, y, a, b, k;
    read(x);
    read(y);
    read(a);
    read(b);
    read(k);
    int u = cnt(a, b), v = cnt(a, x) + cnt(b, y) + 1,
        t = cnt(a, y) + cnt(b, x) + 1;
    if (u <= k && (u % 2 == k % 2)) f = 1;
    if (v <= k && (v % 2 == k % 2)) f = 1;
    if (t <= k && (t % 2 == k % 2)) f = 1;
    if (!f) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
  }
  return 0;
}
