#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
constexpr int maxl = 21;
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<vector<int>> graph(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  array<vector<int>, maxl> step;
  step.fill(vector<int>(n));
  vector<int> tin(n), tout(n), depth(n, -1);
  int time = 0;
  function<void(int, int)> dfs = [&](int v, int p) {
    step[0][v] = p;
    depth[v] = depth[p] + 1;
    tin[v] = time++;
    for (int ne : graph[v])
      if (ne != p) dfs(ne, v);
    tout[v] = time++;
  };
  dfs(0, 0);
  for (int l = 0; l < maxl - 1; l++)
    for (int v = 0; v < n; v++) step[l + 1][v] = step[l][step[l][v]];
  auto anc = [&](int high, int low) {
    return tin[high] <= tin[low] and tout[low] <= tout[high];
  };
  auto lca = [&](int u, int v) {
    if (anc(u, v)) return u;
    if (anc(v, u)) return v;
    for (int i = maxl - 1; i >= 0; i--)
      if (!anc(step[i][u], v)) u = step[i][u];
    return step[0][u];
  };
  auto dist = [&](int u, int v) {
    return depth[u] + depth[v] - 2 * depth[lca(u, v)];
  };
  int tt;
  cin >> tt;
  while (tt--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    x--;
    y--;
    a--;
    b--;
    vector<int> ds = {dist(a, b), dist(a, x) + dist(y, b) + 1,
                      dist(b, x) + dist(y, a) + 1};
    bool gud = false;
    for (int d : ds) gud |= d % 2 == k % 2 and d <= k;
    cout << (gud ? "YES" : "NO") << "\n";
  }
}
