#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
struct node {
  int to, next;
} edge[maxn << 2];
int head[maxn], dep[maxn], fa[maxn][20], cnt, n;
void add(int a, int b) {
  edge[++cnt].to = b;
  edge[cnt].next = head[a];
  head[a] = cnt;
}
void dfs(int now, int f) {
  dep[now] = dep[f] + 1;
  fa[now][0] = f;
  for (int i = head[now]; i != -1; i = edge[i].next) {
    int to = edge[i].to;
    if (to == f) continue;
    dfs(to, now);
  }
}
int lca(int a, int b) {
  if (dep[a] < dep[b]) swap(a, b);
  for (int i = 17; i >= 0; --i) {
    if (dep[fa[a][i]] >= dep[b]) {
      a = fa[a][i];
    }
  }
  for (int i = 17; i >= 0; --i) {
    if (fa[a][i] != fa[b][i]) {
      a = fa[a][i];
      b = fa[b][i];
    }
  }
  if (a != b) return fa[a][0];
  return a;
}
int dis(int a, int b) { return dep[a] + dep[b] - 2 * dep[lca(a, b)]; }
int main() {
  int m, a, b, x, y, k;
  memset(head, -1, sizeof(head));
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    scanf("%d %d", &a, &b);
    add(a, b), add(b, a);
  }
  dfs(1, 0);
  for (int i = 1; i <= 17; ++i) {
    for (int j = 1; j <= n; ++j) {
      fa[j][i] = fa[fa[j][i - 1]][i - 1];
    }
  }
  scanf("%d", &m);
  while (m--) {
    scanf("%d %d %d %d %d", &x, &y, &a, &b, &k);
    int len = dis(a, b), ans = 0;
    if (len <= k && ((len & 1) == (k & 1))) {
      ans = 1;
    } else {
      len = dis(a, x) + dis(y, b) + 1;
      if (len <= k && ((len & 1) == (k & 1))) {
        ans = 1;
      }
      len = dis(a, y) + dis(x, b) + 1;
      if (len <= k && ((len & 1) == (k & 1))) {
        ans = 1;
      }
    }
    printf("%s\n", ans ? "YES" : "NO");
  }
  return 0;
}
