#include <bits/stdc++.h>
using namespace std;
long long int n, l, timer = 0;
vector<long long int> adj[100005];
vector<vector<long long int> > up(100005, vector<long long int>(20));
vector<long long int> tin(100005), tout(100005), dist(100005, 0);
void dfs(long long int v, long long int p) {
  tin[v] = ++timer;
  up[v][0] = p;
  for (long long int i = 1; i <= l; ++i) up[v][i] = up[up[v][i - 1]][i - 1];
  for (long long int u : adj[v]) {
    if (u != p) {
      dist[u] = dist[v] + 1LL;
      dfs(u, v);
    }
  }
  tout[v] = ++timer;
}
bool is_ancestor(long long int u, long long int v) {
  return ((tin[u] <= tin[v]) && (tout[u] >= tout[v]));
}
long long int lca(long long int u, long long int v) {
  if (is_ancestor(u, v)) return u;
  if (is_ancestor(v, u)) return v;
  for (long long int i = l; i >= 0; i--) {
    if (!is_ancestor(up[u][i], v)) u = up[u][i];
  }
  return up[u][0];
}
long long int length(long long int u, long long int v) {
  long long int req = lca(u, v);
  return (dist[u] + dist[v] - 2 * dist[req]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long int i = 0; i <= n - 2; i++) {
    long long int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  timer = 0;
  l = ceil(log2(n));
  long long int root = 1;
  dfs(root, root);
  long long int w;
  cin >> w;
  while (w--) {
    long long int x, y, a, b, k;
    cin >> a >> b >> x >> y >> k;
    long long int dis = length(x, y);
    if (dis <= k && ((dis % 2) == (k % 2))) {
      cout << "YES" << '\n';
      continue;
    }
    dis = length(x, a) + length(y, b) + 1LL;
    if (dis <= k && ((dis % 2) == (k % 2))) {
      cout << "YES" << '\n';
      continue;
    }
    dis = length(x, b) + length(y, a) + 1LL;
    if (dis <= k && ((dis % 2) == (k % 2))) {
      cout << "YES" << '\n';
      continue;
    }
    cout << "NO" << '\n';
  }
  return 0;
}
