#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.0) * 4;
const int64_t INF = 100000000000000003;
const int32_t LOG = 21;
const int MOD = 1e9 + 7;
int n, l;
vector<int> adj[100005];
int timer;
vector<int> tin, tout;
int up[100005][20];
int depth[100005];
void dfs(int v, int p) {
  tin[v] = ++timer;
  up[v][0] = p;
  for (int i = 1; i <= l; ++i) up[v][i] = up[up[v][i - 1]][i - 1];
  for (int u : adj[v]) {
    if (u != p) dfs(u, v);
  }
  tout[v] = ++timer;
}
bool is_ancestor(int u, int v) {
  return tin[u] <= tin[v] && tout[u] >= tout[v];
}
int lca(int u, int v) {
  if (is_ancestor(u, v)) return u;
  if (is_ancestor(v, u)) return v;
  for (int i = l; i >= 0; --i) {
    if (!is_ancestor(up[u][i], v)) u = up[u][i];
  }
  return up[u][0];
}
void preprocess(int root) {
  tin.resize(n + 2);
  tout.resize(n + 2);
  timer = 0;
  l = ceil(log2(n));
  dfs(root, root);
}
void dfs1(int i, int prev, int depth1) {
  depth[i] = depth1;
  for (int j = 0; j < adj[i].size(); j++) {
    if (adj[i][j] != prev) dfs1(adj[i][j], i, depth1 + 1);
  }
}
int dist(int u, int v) {
  int x = lca(u, v);
  int ans = depth[u] + depth[v] - 2 * depth[x];
  return ans;
}
bool check(int val1, int val11, int val, int value) {
  if (val1 <= val && val11 == value) return true;
  return false;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int tests = 1;
  for (int ii = 0; ii < tests; ii++) {
    cin >> n;
    for (int i = 0; i < n - 1; i++) {
      int x, y;
      cin >> x >> y;
      adj[x].push_back(y);
      adj[y].push_back(x);
    }
    dfs1(1, -1, 1);
    preprocess(1);
    int q;
    cin >> q;
    for (int i = 0; i < q; i++) {
      int x, y, a, b, k;
      cin >> x >> y >> a >> b >> k;
      int val1 = dist(a, b);
      int val2 = dist(a, x) + dist(y, b) + 1;
      int val3 = dist(a, y) + dist(x, b) + 1;
      int val = k;
      int val11 = val1 & 1, val22 = val2 & 1, val33 = val3 & 1;
      int value = val & 1;
      if (check(val1, val11, val, value) || check(val2, val22, val, value) ||
          check(val3, val33, val, value))
        cout << "YES" << '\n';
      else
        cout << "NO" << '\n';
    }
  }
  return 0;
}
