#include <bits/stdc++.h>
using namespace std;
int n, u, v, q, xx, yy, aa, bb, kk, pp, b[100005], c[100005][20], d[100005],
    e[100005];
vector<int> a[100005];
void dfs(int x) {
  d[x] = ++pp;
  for (int i = 0; i < a[x].size(); ++i) {
    if (b[a[x][i]] == -1) {
      b[a[x][i]] = b[x] + 1;
      c[a[x][i]][0] = x;
      dfs(a[x][i]);
    }
  }
  e[x] = ++pp;
}
int anc(int x, int y) {
  if (d[x] <= d[y] && e[y] <= e[x])
    return 1;
  else
    return 0;
}
int lca(int x, int y) {
  if (anc(x, y)) return x;
  if (anc(y, x)) return y;
  for (int i = 17; i >= 0; --i) {
    if (!anc(c[x][i], y)) x = c[x][i];
  }
  return c[x][0];
}
int dist(int x, int y) { return b[x] + b[y] - b[lca(x, y)] * 2; }
int check(int kk, int xx) { return kk >= xx && (kk - xx) % 2 == 0; }
int main() {
  scanf("%d", &n);
  memset(b, -1, sizeof(b));
  for (int i = 1; i < n; ++i) {
    scanf("%d %d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  b[1] = 0;
  c[1][0] = 1;
  dfs(1);
  for (int i = 1; i <= 17; ++i) {
    for (int j = 1; j <= n; ++j) c[j][i] = c[c[j][i - 1]][i - 1];
  }
  scanf("%d", &q);
  for (int i = 1; i <= q; ++i) {
    scanf("%d %d %d %d %d", &xx, &yy, &aa, &bb, &kk);
    if (check(kk, dist(aa, bb)) || check(kk, dist(aa, xx) + dist(bb, yy) + 1) ||
        check(kk, dist(aa, xx) + dist(bb, yy) + dist(xx, yy) + 2) ||
        check(kk, dist(aa, yy) + dist(bb, xx) + 1) ||
        check(kk, dist(aa, yy) + dist(bb, xx) + dist(xx, yy) + 2))
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
