#include <bits/stdc++.h>
using namespace std;
inline long long md(long long x) { return x < 1000000007 ? x : x % 1000000007; }
long long power(long long x, long long y) {
  if (y == 0) {
    return 1;
  }
  long long x_ = power(x, y / 2);
  if (y & 1) {
    return md(md(x_ * x_) * md(x));
  } else {
    return md(x_ * x_);
  }
}
long long mod_inverse(long long x) { return power(x, 1000000007 - 2); }
vector<long long> tree[100001];
long long depth[100001];
long long parent[100001][18];
void dfs(long long cur, long long prev) {
  depth[cur] = depth[prev] + 1;
  parent[cur][0] = prev;
  for (long long i = 0; i < tree[cur].size(); i++) {
    if (tree[cur][i] != prev) dfs(tree[cur][i], cur);
  }
}
void precomputeSparseMatrix(long long n) {
  for (long long i = 1; i < 18; i++) {
    for (long long node = 1; node <= n; node++) {
      if (parent[node][i - 1] != -1)
        parent[node][i] = parent[parent[node][i - 1]][i - 1];
    }
  }
}
long long lca(long long u, long long v) {
  if (depth[v] < depth[u]) swap(u, v);
  long long diff = depth[v] - depth[u];
  long long ans = 0;
  ans += diff;
  for (long long i = 0; i < 18; i++)
    if ((diff >> i) & 1) v = parent[v][i];
  if (u == v) return ans;
  for (long long i = 18 - 1; i >= 0; i--)
    if (parent[u][i] != parent[v][i]) {
      u = parent[u][i];
      v = parent[v][i];
      ans += 2 * (1 << i);
    }
  return ans + 2;
}
void addEdge(long long u, long long v) {
  tree[u].push_back(v);
  tree[v].push_back(u);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  memset(parent, -1, sizeof(parent));
  for (long long i = 0; i < (n - 1); i++) {
    long long u, v;
    cin >> u >> v;
    addEdge(u, v);
  }
  dfs(1, 0);
  precomputeSparseMatrix(n);
  long long q;
  cin >> q;
  while (q--) {
    long long x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    long long d = lca(a, b);
    long long d1 = lca(a, x) + lca(b, y) + 1;
    long long d2 = lca(a, y) + lca(b, x) + 1;
    if (d <= k && (d & 1) == (k & 1)) {
      cout << "YES" << endl;
    } else if (d1 <= k && (d1 & 1) == (k & 1)) {
      cout << "YES" << endl;
    } else if (d2 <= k && (d2 & 1) == (k & 1)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
