#include <bits/stdc++.h>
const int N = 1e5 + 5;
struct node {
  int to, nxt;
} e[N << 1];
int h[N], tot, p[N][17], d[N];
inline void add(int a, int b) {
  e[++tot].to = b;
  e[tot].nxt = h[a];
  h[a] = tot;
}
void dfs(int u, int pre) {
  d[u] = d[pre] + 1;
  p[u][0] = pre;
  for (register int i = 1; i <= 16; ++i) p[u][i] = p[p[u][i - 1]][i - 1];
  for (int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == pre) continue;
    dfs(v, u);
  }
}
int lca(int a, int b) {
  if (d[a] > d[b]) {
    int temp = a;
    a = b;
    b = temp;
  };
  register int i;
  for (i = 16; i >= 0; --i)
    if (d[a] <= d[b] - (1 << i)) b = p[b][i];
  if (a == b) return a;
  for (i = 16; i >= 0; --i)
    if (p[a][i] != p[b][i]) a = p[a][i], b = p[b][i];
  return p[a][0];
}
int main() {
  int q, n, a, b, x, y, k;
  register int i;
  scanf("%d", &n);
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &a, &b);
    add(a, b), add(b, a);
  }
  dfs(1, 0);
  scanf("%d", &q);
  for (i = 1; i <= q; ++i) {
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int c = lca(a, b), dis;
    dis = d[a] + d[b] - 2 * d[c];
    if (dis <= k && (k - dis) % 2 == 0)
      printf("YES\n");
    else {
      c = lca(a, x);
      dis = d[a] + d[x] - 2 * d[c];
      c = lca(b, y);
      dis += d[b] + d[y] - 2 * d[c] + 1;
      if (dis <= k && (k - dis) % 2 == 0)
        printf("YES\n");
      else {
        c = lca(a, y);
        dis = d[a] + d[y] - 2 * d[c];
        c = lca(b, x);
        dis += d[b] + d[x] - 2 * d[c] + 1;
        if (dis <= k && (k - dis) % 2 == 0)
          printf("YES\n");
        else
          printf("NO\n");
      }
    }
  }
  return 0;
}
