#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> v, dp;
vector<int> vis, dep;
int dfs(int x) {
  vis[x] = 1;
  for (int i = 0; i < v[x].size(); i++) {
    int y = v[x][i];
    if (vis[y] == 0) {
      dp[y][0] = x;
      dep[y] = dep[x] + 1;
      dfs(y);
    }
  }
  return 0;
}
int lift(int x, int val) {
  for (int i = 0; i <= 25; i++) {
    if ((1 << i) & val) x = dp[x][i];
  }
  return x;
}
int lca(int x, int y) {
  if (dep[x] > dep[y]) {
    x = lift(x, dep[x] - dep[y]);
  }
  if (dep[y] > dep[x]) {
    y = lift(y, dep[y] - dep[x]);
  }
  if (x == y) {
    return x;
  } else {
    for (int i = 25; i >= 0; i--) {
      if (dp[x][i] != dp[y][i]) {
        x = dp[x][i];
        y = dp[y][i];
      }
    }
    return dp[x][0];
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  v.resize(n + 1);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dp.resize(n + 1);
  for (int i = 0; i <= n; i++) dp[i].resize(26, -1);
  vis.resize(n + 1, 0);
  dep.resize(n + 1, 0);
  dep[1] = 1;
  dfs(1);
  for (int j = 1; j <= 25; j++) {
    for (int i = 1; i <= n; i++) {
      int x = dp[i][j - 1];
      if (x != -1) {
        dp[i][j] = dp[x][j - 1];
      }
    }
  }
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int lc1 = lca(a, b);
    int u = dep[a] + dep[b] - 2 * dep[lc1];
    if (u <= k && ((k - u) % 2 == 0)) {
      cout << "YES"
           << "\n";
      continue;
    }
    int lc2 = lca(x, a);
    int lc3 = lca(a, y);
    int lc4 = lca(x, b);
    int lc5 = lca(y, b);
    int path1 =
        1 + dep[a] + dep[x] - 2 * dep[lc2] + dep[b] + dep[y] - 2 * dep[lc5];
    int path2 =
        1 + dep[a] + dep[y] - 2 * dep[lc3] + dep[b] + dep[x] - 2 * dep[lc4];
    u = path1;
    if (u <= k && ((k - u) % 2 == 0)) {
      cout << "YES"
           << "\n";
      continue;
    }
    u = path2;
    if (u <= k && ((k - u) % 2 == 0)) {
      cout << "YES"
           << "\n";
      continue;
    }
    cout << "NO"
         << "\n";
    continue;
  }
  return 0;
}
