#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, q;
vector<int> g[maxn];
int d[maxn];
int deda[maxn][20];
int brojac;
int in[maxn];
int out[maxn];
void dfs(int v, int p) {
  deda[v][0] = p;
  for (int i = 1; i < 18; i++) deda[v][i] = deda[deda[v][i - 1]][i - 1];
  in[v] = ++brojac;
  for (auto u : g[v]) {
    if (u != p) {
      d[u] = d[v] + 1;
      dfs(u, v);
    }
  }
  out[v] = brojac;
}
bool predak(int u, int v) { return (in[u] <= in[v] && out[u] >= out[v]); }
int lca(int u, int v) {
  if (predak(u, v)) return u;
  if (predak(u, v)) return v;
  for (int i = 18; i >= 0; i--) {
    if (deda[u][i] && !predak(deda[u][i], v)) u = deda[u][i];
  }
  return deda[u][0];
}
int dist(int u, int v) { return d[u] + d[v] - 2 * d[lca(u, v)]; }
long long calc(int u) {
  for (int i = 18; i >= 0; i--) {
    if (u & (1 << i)) u = deda[u][i];
  }
  return u;
}
bool check(int x, int k) { return (x <= k && (x % 2 == k % 2)); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0);
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int kec = dist(a, b);
    int dva = dist(a, x) + dist(b, y) + 1;
    int tri = dist(b, x) + dist(a, y) + 1;
    if (check(kec, k) || check(dva, k) || check(tri, k))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
