#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 1e6 + 11;
const int max2H = 25;
int n;
vector<int> g[maxn];
int depth[maxn];
int btable[25 + 5][maxn];
int q;
void dfs(int at, int p, int d) {
  depth[at] = d;
  btable[0][at] = p;
  for (auto x : g[at]) {
    if (x != p) dfs(x, at, d + 1);
  }
}
int findLCA(int a, int b) {
  if (depth[a] > depth[b]) swap(a, b);
  int diff = depth[b] - depth[a];
  for (int j = max2H; j >= 0; j--) {
    if ((diff >> j) & 1) {
      b = btable[j][b];
    }
  }
  if (a == b) return a;
  for (int j = max2H; j >= 0; j--) {
    if (btable[j][a] != btable[j][b]) {
      a = btable[j][a];
      b = btable[j][b];
    }
  }
  return btable[0][a];
}
int dist(int a, int b) {
  if (a == b) return 0;
  int lca = findLCA(a, b);
  return (depth[a] + depth[b] - 2 * depth[lca]);
}
bool poss(int x, int y, int a, int b, int k) {
  int curdist = dist(a, b);
  if (curdist <= k && curdist % 2 == k % 2) return true;
  curdist = dist(a, x) + 1 + dist(b, y);
  if (curdist <= k && curdist % 2 == k % 2) return true;
  curdist = dist(a, y) + 1 + dist(b, x);
  if (curdist <= k && curdist % 2 == k % 2) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(btable, -1, sizeof btable);
  cin >> n;
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0, 0);
  for (int j = 1; j <= max2H; j++) {
    for (int i = 1; i <= n; i++) {
      if (btable[j - 1][i] != -1) {
        btable[j][i] = btable[j - 1][btable[j - 1][i]];
      }
    }
  }
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    if (poss(x, y, a, b, k)) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
