#include <bits/stdc++.h>
using namespace std;
const long long int MAX_N = 100000;
const long long int LIM = 17;
const long long int INF = (long long int)1e9 + 7;
vector<long long int> adj[MAX_N + 5];
long long int depth[MAX_N + 5];
long long int par[MAX_N + 5][LIM + 1];
void build(long long int cur, long long int p) {
  long long int i;
  depth[cur] = depth[p] + 1;
  par[cur][0] = p;
  for (i = 1; i <= LIM; i++) par[cur][i] = par[par[cur][i - 1]][i - 1];
  for (long long int x : adj[cur])
    if (x != p) build(x, cur);
}
long long int lca_len(long long int a, long long int b) {
  long long int i, len = 0;
  if (depth[a] > depth[b]) swap(a, b);
  for (i = LIM; i >= 0; i--) {
    if (depth[par[b][i]] >= depth[a]) {
      b = par[b][i];
      len += (1 << i);
    }
  }
  if (a == b) return len;
  for (i = LIM; i >= 0; i--) {
    if (par[a][i] != par[b][i]) {
      a = par[a][i];
      b = par[b][i];
      len += (1 << (i + 1));
    }
  }
  return len + 2;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int n, q, i;
  cin >> n;
  for (i = 0; i < n - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  build(1, 0);
  cin >> q;
  while (q--) {
    long long int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    long long int without = lca_len(a, b);
    long long int with =
        min(lca_len(a, x) + lca_len(y, b), lca_len(a, y) + lca_len(x, b)) + 1;
    long long int ans = INF;
    if (without % 2 == k % 2) ans = without;
    if (with % 2 == k % 2) ans = min(ans, with);
    cout << (ans <= k ? "YES" : "NO") << '\n';
  }
}
