#include <bits/stdc++.h>
using namespace std;
int lev[100005];
void dfs(int u, int p, int **memo, int log, vector<int> *g) {
  memo[u][0] = p;
  for (int i = 1; i <= log; i++) memo[u][i] = memo[memo[u][i - 1]][i - 1];
  for (int v : g[u]) {
    if (v != p) {
      lev[v] = lev[u] + 1;
      dfs(v, u, memo, log, g);
    }
  }
}
int lca(int u, int v, int log, int **memo) {
  if (lev[u] < lev[v]) swap(u, v);
  for (int i = log; i >= 0; i--)
    if ((lev[u] - pow(2, i)) >= lev[v]) u = memo[u][i];
  if (u == v) return u;
  for (int i = log; i >= 0; i--) {
    if (memo[u][i] != memo[v][i]) {
      u = memo[u][i];
      v = memo[v][i];
    }
  }
  return memo[u][0];
}
int main() {
  int n;
  cin >> n;
  vector<int> g[n + 1];
  int log = (int)ceil(log2(n));
  int **memo = new int *[n + 1];
  for (int i = 0; i < n + 1; i++) memo[i] = new int[log + 1];
  for (int i = 0; i <= n; i++) memset(memo[i], -1, sizeof memo[i]);
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    g[b].push_back(a);
    g[a].push_back(b);
  }
  dfs(1, 1, memo, log, g);
  int q;
  cin >> q;
  while (q--) {
    int x, y, k;
    cin >> x >> y >> a >> b >> k;
    int lc = lca(a, b, log, memo);
    int disab = *(lev + a) + *(lev + b) - (*(lev + lc)) - (*(lev + lc));
    if (disab == k) {
      cout << "YES\n";
      continue;
    } else if (disab < k) {
      if ((k - disab) % 2 == 0) {
        cout << "YES\n";
        continue;
      }
    }
    lc = lca(a, x, log, memo);
    int disax = *(lev + a) + *(lev + x) - (*(lev + lc)) - (*(lev + lc));
    int lc1 = lca(y, b, log, memo);
    int disyb = *(lev + y) + *(lev + b) - (*(lev + lc1)) - (*(lev + lc1));
    disab = 1 + disax + disyb;
    if (disab == k) {
      cout << "YES\n";
      continue;
    } else if (disab < k) {
      if ((k - disab) % 2 == 0) {
        cout << "YES\n";
        continue;
      }
    }
    lc = lca(a, y, log, memo);
    disax = *(lev + a) + *(lev + y) - (*(lev + lc)) - (*(lev + lc));
    lc1 = lca(x, b, log, memo);
    disyb = *(lev + x) + *(lev + b) - (*(lev + lc1)) - (*(lev + lc1));
    disab = 1 + disax + disyb;
    if (disab == k) {
      cout << "YES\n";
      continue;
    } else if (disab < k) {
      if ((k - disab) % 2 == 0) {
        cout << "YES\n";
        continue;
      }
    }
    cout << "NO\n";
  }
  return 0;
}
