#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 50;
int cnt, ans, disx, n, m;
int a, b, x, y, k;
int head[maxn];
int fa[maxn][22];
int lg[maxn];
int depth[maxn];
int res[maxn];
bool vis[maxn];
struct edge {
  int t, nex;
};
edge e[maxn << 1];
void add(int a, int b) {
  e[++cnt].t = b;
  e[cnt].nex = head[a];
  head[a] = cnt;
}
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);
  while (depth[x] > depth[y]) x = fa[x][lg[depth[x] - depth[y]] - 1];
  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 cal(int x, int y) { return depth[x] + depth[y] - 2 * depth[lca(x, y)]; }
int main() {
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs(1, 0);
  for (int i = 1; i <= n; i++) lg[i] = lg[i - 1] + (1 << lg[i - 1] == i);
  cin >> m;
  for (int i = 1; i <= m; ++i) {
    scanf("%d %d %d %d %d", &x, &y, &a, &b, &k);
    int disab = cal(a, b);
    if (disab <= k && abs(disab - k) % 2 == 0) {
      printf("YES\n");
      continue;
    }
    int disax = cal(a, x);
    int disby = cal(b, y);
    int tot1 = disax + disby + 1;
    if (tot1 <= k && abs(tot1 - k) % 2 == 0) {
      printf("YES\n");
      continue;
    }
    int disay = cal(a, y);
    int disbx = cal(b, x);
    int tot2 = disay + disbx + 1;
    if (tot2 <= k && abs(tot2 - k) % 2 == 0) {
      printf("YES\n");
      continue;
    }
    printf("NO\n");
  }
  return 0;
}
