#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char c = getchar();
  long long ans = 0, tag = 1;
  while (!isdigit(c)) tag = (c == '-' ? -1 : 1), c = getchar();
  while (isdigit(c)) ans = (ans << 3) + (ans << 1) + c - '0', c = getchar();
  return ans * tag;
}
const long long maxn = 1e5 + 5;
long long n, cnt, head[maxn];
long long tot, fa[21][maxn], dep[maxn];
struct edge {
  long long to, next;
} e[maxn << 1];
void add(long long x, long long y) {
  e[++cnt] = (edge){y, head[x]};
  head[x] = cnt;
}
void dfs(long long x, long long f) {
  dep[x] = dep[f] + 1;
  fa[0][x] = f;
  for (long long i = 1; i <= tot; i++) {
    fa[i][x] = fa[i - 1][fa[i - 1][x]];
  }
  for (long long i = head[x]; i; i = e[i].next) {
    if (e[i].to == f) continue;
    dfs(e[i].to, x);
  }
}
long long lca(long long x, long long y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (long long i = tot; i >= 0; i--) {
    if (dep[fa[i][x]] >= dep[y]) x = fa[i][x];
  }
  if (x == y) return x;
  for (long long i = tot; i >= 0; i--) {
    if (fa[i][x] != fa[i][y]) {
      x = fa[i][x];
      y = fa[i][y];
    }
  }
  return fa[0][x];
}
long long dist(long long x, long long y) {
  return dep[x] + dep[y] - 2 * dep[lca(x, y)];
}
bool check(long long dis, long long k) {
  return (dis <= k && ((dis & 1) == (k & 1)));
}
int main() {
  n = read();
  tot = log(n) / log(2) + 1;
  for (long long i = 1, x, y; i < n; i++) {
    x = read(), y = read();
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  long long q = read();
  while (q--) {
    long long x = read(), y = read(), a = read(), b = read(), k = read();
    if (check(dist(a, b), k) || check(dist(a, x) + 1 + dist(b, y), k) ||
        check(dist(a, y) + 1 + dist(b, x), k)) {
      puts("YES");
    } else
      puts("NO");
  }
  return 0;
}
