#include <bits/stdc++.h>
using namespace std;
const int N = 300010;
int h[N], nxt[N << 1], to[N << 1], sz[N], fa[N], dep[N], bl[N], cnt;
void init() {
  memset(h, 0, sizeof h);
  cnt = 0;
}
void add(int x, int y) {
  to[++cnt] = y;
  nxt[cnt] = h[x];
  h[x] = cnt;
}
void dfs1(int x) {
  sz[x] = 1;
  for (int i = h[x]; i; i = nxt[i])
    if (to[i] != fa[x]) {
      fa[to[i]] = x;
      dep[to[i]] = dep[x] + 1;
      dfs1(to[i]);
      sz[x] += sz[to[i]];
    }
}
void dfs2(int x, int c) {
  int k = 0;
  bl[x] = c;
  for (int i = h[x]; i; i = nxt[i])
    if (to[i] != fa[x] && sz[to[i]] > sz[k]) k = to[i];
  if (!k) return;
  dfs2(k, c);
  for (int i = h[x]; i; i = nxt[i])
    if (to[i] != fa[x] && to[i] != k) dfs2(to[i], to[i]);
}
int lca(int x, int y) {
  while (bl[x] != bl[y]) {
    if (dep[bl[x]] < dep[bl[y]]) swap(x, y);
    x = fa[bl[x]];
  }
  if (dep[x] < dep[y]) return x;
  return y;
}
int dist(int x, int y) { return dep[x] + dep[y] - 2 * dep[lca(x, y)]; }
int n, m;
int main() {
  scanf("%d", &n);
  for (int x, y, i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y), add(y, x);
  }
  dfs1(1);
  dfs2(1, 1);
  scanf("%d", &m);
  while (m--) {
    int a, b, k, x, y;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int l = dist(a, b);
    int f = min(dist(a, x) + dist(b, y), dist(a, y) + dist(b, x)) + 1;
    if ((k >= l && (k - l) % 2 == 0) || (k >= f && (k - f) % 2 == 0))
      puts("YES");
    else
      puts("NO");
  }
}
