#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e5;
vector<int> adj[mxn + 1];
bool vis[mxn + 1];
int dep[mxn + 1], first[mxn + 1];
int n;
vector<int> euler, t;
void dfs(int v, int d = 0) {
  vis[v] = true;
  dep[v] = d;
  first[v] = euler.size();
  euler.push_back(v);
  for (int nbr : adj[v]) {
    if (!vis[nbr]) {
      dfs(nbr, d + 1);
      euler.push_back(v);
    }
  }
}
int minh(int u, int v) {
  if (dep[u] < dep[v])
    return u;
  else
    return v;
}
void build() {
  for (int i = euler.size() - 1; i > 0; --i)
    t[i] = minh(t[i << 1], t[i << 1 | 1]);
}
int query(int l, int r) {
  int out = 0;
  for (l += euler.size(), r += euler.size(); l < r; l >>= 1, r >>= 1) {
    if (l & 1) out = minh(out, t[l++]);
    if (r & 1) out = minh(out, t[--r]);
  }
  return out;
}
int lca(int u, int v) {
  int l = min(first[u], first[v]);
  int r = max(first[u], first[v]);
  return query(l, r + 1);
}
int dist(int u, int v) {
  int a = lca(u, v);
  return dep[u] + dep[v] - 2 * dep[a];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1);
  dep[0] = INT_MAX;
  t.resize(2 * euler.size());
  for (int i = 0; i < euler.size(); ++i) t[i + euler.size()] = euler[i];
  build();
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int ab = dist(a, b);
    if (ab <= k && ab % 2 == k % 2) {
      cout << "YES\n";
      continue;
    }
    int via = min(dist(a, x) + dist(b, y) + 1, dist(a, y) + dist(b, x) + 1);
    if (via <= k && via % 2 == k % 2) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
