#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
const long long L = ceil(log2(N)) + 1;
vector<vector<long long> > adj(N, vector<long long int>());
vector<long long int> tin(N, 0), tout(N, 0);
vector<vector<long long> > up(N, vector<long long int>(L));
vector<long long int> d(N, 0);
long long n;
long long tr = 0;
void dfs(long long u, long long p) {
  tin[u] = tr++;
  if (p != -1) {
    d[u] = d[p] + 1;
    for (long long int i = 0; i < L; i++) {
      if (i == 0)
        up[u][0] = p;
      else
        up[u][i] = up[up[u][i - 1]][i - 1];
    }
  }
  for (long long int i = 0; i < (long long int)adj[u].size(); i++)
    if (adj[u][i] != p) dfs(adj[u][i], u);
  tout[u] = tr++;
  return;
}
long long is_ancestor(long long u, long long v) {
  return tin[u] <= tin[v] && tout[u] >= tout[v];
}
long long lca(long long u, long long v) {
  if (is_ancestor(u, v)) return u;
  if (is_ancestor(v, u)) return v;
  for (long long i = L - 1; i >= 0; i--) {
    if (is_ancestor(up[u][i], v) == 0) u = up[u][i];
  }
  return up[u][0];
}
long long dist(long long u, long long v) {
  long long an = lca(u, v);
  return d[u] - d[an] + d[v] - d[an];
}
int solve() {
  cin >> n;
  for (long long int i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    x--, y--;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs(0, -1);
  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 d1 = dist(a, b);
    long long d2 = dist(a, x) + 1 + dist(y, b);
    long long d3 = dist(a, y) + 1 + dist(x, b);
    if ((d1 <= k && (d1 - k) % 2 == 0) || (d2 <= k && (d2 - k) % 2 == 0) ||
        (d3 <= k && (d3 - k) % 2 == 0))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
int main() {
  auto start = chrono::high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  while (test_cases--) solve();
  auto stop = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
}
