#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e5 + 5;
const int pmax = 17;
vector<int> l[nmax];
int tata[nmax], lca[nmax][30], d[nmax];
void dfs(int nod, int t) {
  lca[nod][0] = t;
  d[nod] = d[t] + 1;
  for (int fiu : l[nod])
    if (fiu != t) dfs(fiu, nod);
}
void build_lca(int n) {
  for (int i = 1; i <= pmax; i++)
    for (int j = 1; j <= n; j++) lca[j][i] = lca[lca[j][i - 1]][i - 1];
}
int find_lca(int x, int y) {
  int l = 0;
  if (d[x] < d[y]) swap(x, y);
  int dd = d[x] - d[y];
  while (dd) {
    int z = dd & (-dd);
    int xe = (int)log2(z);
    x = lca[x][xe];
    dd -= z;
    l += z;
  }
  if (x == y) return l;
  l += 2;
  for (int i = pmax; i >= 0; i--)
    if (lca[x][i] != lca[y][i]) {
      x = lca[x][i];
      y = lca[y][i];
      l += (1 << (i + 1));
    }
  return l;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, u, v, q, x, y, k;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    l[u].push_back(v);
    l[v].push_back(u);
  }
  dfs(1, 0);
  build_lca(n);
  cin >> q;
  while (q--) {
    int mn = INT_MAX;
    cin >> x >> y >> u >> v >> k;
    int lcadir = find_lca(u, v);
    int lcaxy = find_lca(u, x) + find_lca(y, v) + 1;
    int lcayx = find_lca(u, y) + find_lca(x, v) + 1;
    if ((lcadir & 1) == (k & 1)) mn = min(mn, lcadir);
    if ((lcaxy & 1) == (k & 1)) mn = min(mn, lcaxy);
    if ((lcayx & 1) == (k & 1)) mn = min(mn, lcayx);
    cout << ((mn <= k) ? "YES" : "NO") << "\n";
  }
  return 0;
}
