#include <bits/stdc++.h>
using namespace std;
long long int tp[1000005];
int par[1000005][22];
int n, m;
int tin[1000005];
int tout[1000005];
int timer;
long long int MAXLOG = log(1000005);
vector<long long int> ve[1000005];
void dfs0(int v, int p) {
  par[v][0] = p;
  for (int i = 1; i < MAXLOG; ++i) {
    par[v][i] = par[par[v][i - 1]][i - 1];
  }
  tin[v] = timer++;
  for (int to : ve[v]) {
    if (to == p) {
      continue;
    }
    dfs0(to, v);
  }
  tout[v] = timer;
}
bool upper(int a, int b) { return tin[a] <= tin[b] && tout[b] <= tout[a]; }
int lca(int a, int b) {
  if (upper(a, b)) return a;
  if (upper(b, a)) return b;
  for (long long int l = MAXLOG - 1; l >= 0; l--) {
    if (!upper(par[a][l], b)) {
      a = par[a][l];
    }
  }
  return par[a][0];
}
bool vis[1000005];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  for (long long int i = 1; i <= n - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    ve[u].push_back(v);
    ve[v].push_back(u);
  }
  queue<pair<long long int, long long int> > q;
  q.push({1ll, 0ll});
  while (!q.empty()) {
    long long int s = q.front().first;
    tp[s] = q.front().second;
    q.pop();
    vis[s] = true;
    for (auto it : ve[s]) {
      if (!vis[it]) q.push({it, tp[s] + 1});
    }
  }
  dfs0(1, 1);
  long long int qq;
  cin >> qq;
  while (qq--) {
    long long int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    long long int parent = lca(a, b);
    long long int dis = tp[b] - tp[parent] + tp[a] - tp[parent];
    if (dis % 2 == k % 2) {
      if (k >= dis) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    long long int parent1 = lca(x, a);
    long long int parent2 = lca(y, b);
    long long int minn = tp[a] - tp[parent1] + tp[x] - tp[parent1] + 1 + tp[b] -
                         tp[parent2] + tp[y] - tp[parent2];
    if (minn % 2 == k % 2) {
      if (k >= minn) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    parent1 = lca(y, a);
    parent2 = lca(x, b);
    minn = tp[a] - tp[parent1] + tp[x] - tp[parent1] + 1 + tp[b] - tp[parent2] +
           tp[y] - tp[parent2];
    if (minn % 2 == k % 2) {
      if (k >= minn) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    cout << "NO"
         << " " << endl;
    ;
  }
  return 0;
}
