#include <bits/stdc++.h>
int n, q;
int d[100005], lg[100005], f[100005][25];
std::vector<int> v[100005];
void dfs(int x, int fa) {
  f[x][0] = fa;
  d[x] = d[fa] + 1;
  for (int i = 1; i <= lg[d[x]]; ++i) f[x][i] = f[f[x][i - 1]][i - 1];
  for (int i : v[x])
    if (i != fa) dfs(i, x);
}
inline int lca(int x, int y) {
  if (d[x] < d[y]) std::swap(x, y);
  while (d[x] > d[y]) x = f[x][lg[d[x] - d[y]]];
  if (x == y) return x;
  for (int i = lg[d[x]]; ~i; --i)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
inline int dis(int x, int y) { return d[x] + d[y] - (d[lca(x, y)] << 1); }
int main() {
  scanf("%d", &n);
  for (int i = 1, x, y; i < n; ++i) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 2; i <= n; ++i) lg[i] = lg[i >> 1] + 1;
  dfs(1, 0);
  scanf("%d", &q);
  for (int i = 0, x, y, a, b, k, Dis; i < q; ++i) {
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    Dis = dis(a, b);
    if (Dis <= k && (Dis & 1) == (k & 1)) {
      puts("YES");
      continue;
    }
    Dis = dis(a, x) + dis(b, y) + 1;
    if (Dis <= k && (Dis & 1) == (k & 1)) {
      puts("YES");
      continue;
    }
    Dis = dis(a, y) + dis(b, x) + 1;
    if (Dis <= k && (Dis & 1) == (k & 1)) {
      puts("YES");
      continue;
    }
    puts("NO");
  }
  return 0;
}
