#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int LGN = 17;
vector<int> g[N];
int d[N], par[N][LGN];
void dfs(int v, int p) {
  d[v] = d[p] + 1;
  par[v][0] = p;
  for (auto u : g[v]) {
    if (u != p) dfs(u, v);
  }
}
inline int dist(int u, int v) {
  int x = u, y = v;
  if (d[x] < d[y]) swap(x, y);
  int diff = d[x] - d[y];
  for (int i = 0; i < LGN; i++) {
    if (diff & (1 << i)) x = par[x][i];
  }
  if (x == y) return d[u] + d[v] - 2 * d[x];
  for (int i = LGN - 1; i >= 0; i--) {
    if (par[x][i] != par[y][i]) {
      x = par[x][i];
      y = par[y][i];
    }
  }
  x = par[x][0];
  return d[u] + d[v] - 2 * d[x];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(32);
  int n, u, v;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0);
  for (int k = 1; k < LGN; k++) {
    for (int i = 1; i <= n; i++) {
      par[i][k] = par[par[i][k - 1]][k - 1];
    }
  }
  int q, x, y, k, a, b;
  cin >> q;
  while (q--) {
    cin >> x >> y >> a >> b >> k;
    int d1 = dist(a, b);
    int d2 = dist(a, x) + 1 + dist(y, b);
    int d3 = dist(a, y) + 1 + dist(x, b);
    if (d1 <= k && (d1 % 2) == (k % 2)) {
      cout << "YES" << '\n';
      continue;
    }
    if (d2 <= k && (d2 % 2) == (k % 2)) {
      cout << "YES" << '\n';
      continue;
    }
    if (d3 <= k && (d3 % 2) == (k % 2)) {
      cout << "YES" << '\n';
      continue;
    }
    cout << "NO" << '\n';
  }
  return 0;
}
