#include <bits/stdc++.h>
using namespace std;
const int N = 200100, M = 20010010;
int head[N], ver[M], Next[M], tot;
int n, q;
int f[N][20], d[N], t, dist[N];
void add(int x, int y) {
  ver[++tot] = y;
  Next[tot] = head[x];
  head[x] = tot;
}
void bfs() {
  queue<int> q;
  q.push(1);
  d[1] = 1;
  while (q.size()) {
    int x = q.front();
    q.pop();
    for (int i = head[x]; i; i = Next[i]) {
      int y = ver[i];
      if (d[y]) continue;
      d[y] = d[x] + 1;
      f[y][0] = x;
      for (int j = 1; j <= t; j++) f[y][j] = f[f[y][j - 1]][j - 1];
      q.push(y);
    }
  }
}
int lca(int x, int y) {
  if (d[x] > d[y]) swap(x, y);
  for (int i = t; i >= 0; i--)
    if (d[f[y][i]] >= d[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];
}
int dis(int u, int v) {
  int dx = lca(u, v);
  return d[u] + d[v] - 2 * d[dx];
}
int main() {
  scanf("%d", &n);
  tot = 0;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  t = (int)(log(n) / log(2) + 1);
  bfs();
  scanf("%d", &q);
  while (q--) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int s1 = dis(a, b), s2 = dis(a, x) + dis(b, y) + 1,
        s3 = dis(a, y) + dis(b, x) + 1;
    if ((k >= s1 && (k - s1) % 2 == 0) || (k >= s2 && (k - s2) % 2 == 0) ||
        (k >= s3 && (k - s3) % 2 == 0))
      printf("YES\n");
    else
      printf("NO\n");
  }
}
