#include <bits/stdc++.h>
using namespace std;
const int MN = 100012;
const int LOG = 19;
int n, tin[MN], tout[MN], pa[MN][LOG], dt[MN], ctr = 0;
vector<int> g[MN];
void dfs(int u, int p = 0) {
  tin[u] = ctr++;
  pa[u][0] = p;
  if (u > 0) dt[u] = dt[p] + 1;
  for (int i = 1; i < LOG; i++) pa[u][i] = pa[pa[u][i - 1]][i - 1];
  for (int v : g[u]) {
    if (v == p) continue;
    dfs(v, u);
  }
  tout[u] = ctr++;
}
bool anc(int u, int v) { return tin[u] <= tin[v] and tout[u] >= tout[v]; }
int lca(int u, int v) {
  if (anc(u, v)) return u;
  if (anc(v, u)) return v;
  for (int i = LOG - 1; i >= 0; i--)
    if (!anc(pa[u][i], v)) u = pa[u][i];
  return pa[u][0];
}
int dist(int u, int v) {
  int a = lca(u, v);
  return dt[u] - dt[a] + dt[v] - dt[a];
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  memset(dt, 0, sizeof(dt));
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0);
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    --x;
    --y;
    --a;
    --b;
    int da = dist(a, b);
    int db = min(dist(a, x) + dist(b, y), dist(a, y) + dist(b, x)) + 1;
    if (da > k and db > k)
      cout << "NO\n";
    else {
      int rk = k & 1, ra = da & 1, rb = db & 1;
      if (da <= k and rk == ra)
        cout << "YES\n";
      else if (db <= k and rk == rb)
        cout << "YES\n";
      else
        cout << "NO\n";
    }
  }
  return 0;
}
