#include <bits/stdc++.h>
using namespace std;
struct yyy {
  int t, nex;
} e[2 * 100005];
int depth[100005] = {0}, fa[100005][22] = {0}, lg[100005] = {0}, head[100005];
int tot;
void add(int x, int y) {
  e[++tot].t = y;
  e[tot].nex = head[x];
  head[x] = tot;
}
void dfs(int f, int fath) {
  depth[f] = depth[fath] + 1;
  fa[f][0] = fath;
  for (int i = 1; (1 << i) <= depth[f]; i++) fa[f][i] = fa[fa[f][i - 1]][i - 1];
  for (int i = head[f]; i; i = e[i].nex)
    if (e[i].t != fath) dfs(e[i].t, f);
}
int lca(int x, int y) {
  if (depth[x] < depth[y]) swap(x, y);
  for (int i = 0; i < 22; i++)
    if ((depth[x] - depth[y]) & (1 << i)) x = fa[x][i];
  if (x == y) return x;
  for (int k = lg[depth[x]] - 1; k >= 0; k--)
    if (fa[x][k] != fa[y][k]) x = fa[x][k], y = fa[y][k];
  return fa[x][0];
}
int askd(int x, int y) { return depth[x] + depth[y] - 2 * depth[lca(x, y)]; }
int n, m, s;
int main() {
  scanf("%d", &n);
  s = 1;
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(s, 0);
  for (int i = 1; i <= n; i++) lg[i] = lg[i - 1] + (1 << lg[i - 1] == i);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int without = askd(a, b);
    int with = min(askd(a, x) + askd(y, b), askd(a, y) + askd(x, b)) + 1;
    int ans = 0x3f3f3f3f;
    if (without % 2 == k % 2) ans = without;
    if (with % 2 == k % 2) ans = min(ans, with);
    cout << (ans <= k ? "YES\n" : "NO\n");
  }
  return 0;
}
