#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, q, f[maxn][25], h[maxn];
struct node {
  int nxt, to;
} v[maxn << 1];
int head[maxn << 1], cnt = 1, lg[500001];
void add(int from, int to) {
  v[cnt].to = to;
  v[cnt].nxt = head[from];
  head[from] = cnt++;
}
int lca(int x, int y) {
  if (h[x] < h[y]) swap(x, y);
  while (h[x] > h[y]) x = f[x][lg[h[x] - h[y]] - 1];
  if (x == y) return x;
  for (int k = lg[h[x]] - 1; k >= 0; --k)
    if (f[x][k] != f[y][k]) x = f[x][k], y = f[y][k];
  return f[x][0];
}
int solve(int x, int y) { return h[x] + h[y] - h[lca(x, y)] * 2; }
void dfs(int now, int fath) {
  f[now][0] = fath;
  h[now] = h[fath] + 1;
  for (int i = 1; i <= lg[h[now]]; ++i) f[now][i] = f[f[now][i - 1]][i - 1];
  for (int i = head[now]; i; i = v[i].nxt)
    if (v[i].to != fath) dfs(v[i].to, now);
}
bool check(int x, int y) {
  if (y >= x && ((x % 2) == (y % 2))) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) lg[i] = lg[i - 1] + (1 << lg[i - 1] == i);
  for (int i = 1, u, v; i < n; i++) {
    cin >> u >> v;
    add(u, v);
    add(v, u);
  }
  dfs(1, 0);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= 20; j++) f[i][j] = f[f[i][j - 1]][j - 1];
  cin >> q;
  for (int i = 0; i < q; i++) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int X = solve(a, b), Y = solve(a, x) + solve(y, b) + 1,
        Z = solve(a, y) + solve(x, b) + 1;
    if (check(X, k) || check(Y, k) || check(Z, k))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
