#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MB = 20;
const int MOD = 998244353;
vector<vector<int>> g, p;
vector<int> h;
void dfs(int v, int pr = -1) {
  p[0][v] = pr == -1 ? v : pr;
  for (int i = 0; i < MB - 1; i++) {
    p[i + 1][v] = p[i][p[i][v]];
  }
  for (int u : g[v]) {
    if (u != pr) {
      h[u] = h[v] + 1;
      dfs(u, v);
    }
  }
}
int getLCA(int a, int b) {
  if (h[a] < h[b]) swap(a, b);
  for (int i = MB - 1; i >= 0; i--) {
    if (h[p[i][a]] >= h[b]) a = p[i][a];
  }
  if (a == b) return a;
  for (int i = MB - 1; i >= 0; i--) {
    if (p[i][a] != p[i][b]) {
      a = p[i][a];
      b = p[i][b];
    }
  }
  return p[0][a];
}
int getLen(int a, int b) {
  int c = getLCA(a, b);
  return h[a] + h[b] - 2 * h[c];
}
void solve() {
  int n;
  cin >> n;
  g.resize(n);
  for (int i = 0; i < n - 1; i++) {
    int from, to;
    cin >> from >> to;
    from--;
    to--;
    g[from].push_back(to);
    g[to].push_back(from);
  }
  p.resize(MB, vector<int>(n));
  h.resize(n);
  dfs(0);
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    x--;
    y--;
    a--;
    b--;
    int len = getLen(a, b);
    bool good = false;
    if (len <= k && (k - len) % 2 == 0) good = true;
    len = getLen(a, x) + getLen(b, y) + 1;
    if (len <= k && (k - len) % 2 == 0) good = true;
    len = getLen(a, y) + getLen(b, x) + 1;
    if (len <= k && (k - len) % 2 == 0) good = true;
    cout << (good ? "YES\n" : "NO\n");
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t--) solve();
}
