#include <bits/stdc++.h>
using namespace std;
struct lca {
  long long Log;
  vector<vector<long long>> memo;
  vector<long long> depth;
  lca(const vector<vector<long long>> &graph, long long root) {
    long long n = graph.size();
    Log = 1;
    while ((1 << Log) < n) ++Log;
    depth.resize(n, 0);
    memo.resize(n, vector<long long>(Log));
    dfs(root, root, graph);
  }
  void dfs(long long node, long long par,
           const vector<vector<long long>> &graph) {
    memo[node][0] = par;
    for (long long i = 1; i < Log; ++i) {
      memo[node][i] = memo[memo[node][i - 1]][i - 1];
    }
    for (long long to : graph[node]) {
      if (to == par) continue;
      depth[to] = 1 + depth[node];
      dfs(to, node, graph);
    }
  }
  long long getLca(long long x, long long y) {
    if (depth[x] < depth[y]) swap(x, y);
    long long diff = depth[x] - depth[y];
    for (long long bit = 0; bit < Log; ++bit) {
      if (diff & (1 << bit)) {
        x = memo[x][bit];
      }
    }
    for (long long bit = Log - 1; bit >= 0; --bit) {
      if (memo[x][bit] != memo[y][bit]) {
        x = memo[x][bit];
        y = memo[y][bit];
      }
    }
    if (x != y) x = memo[x][0];
    return x;
  }
  long long distEdges(long long x, long long y) {
    return depth[x] + depth[y] - 2 * depth[getLca(x, y)];
  }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<vector<long long>> adj(n);
  for (long long i = 0; i < n - 1; ++i) {
    long long u, v;
    cin >> u >> v;
    --u, --v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  lca l(adj, 0);
  long long q;
  cin >> q;
  while (q--) {
    long long x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    --x, --y, --a, --b;
    long long currDistEdges = l.distEdges(a, b);
    if (currDistEdges % 2 == k % 2 && currDistEdges <= k) {
      cout << "YES\n";
      continue;
    }
    currDistEdges = l.distEdges(a, x) + 1 + l.distEdges(y, b);
    if (currDistEdges % 2 == k % 2 && currDistEdges <= k) {
      cout << "YES\n";
      continue;
    }
    currDistEdges = l.distEdges(a, y) + 1 + l.distEdges(x, b);
    if (currDistEdges % 2 == k % 2 && currDistEdges <= k) {
      cout << "YES\n";
      continue;
    }
    cout << "NO\n";
  }
}
