#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector<int> e[N];
int anc[N][20];
int dep[N];
void dfs(int u, int fa) {
  dep[u] = dep[fa] + 1;
  anc[u][0] = fa;
  for (int i = 1; i <= 17; i++) {
    anc[u][i] = anc[anc[u][i - 1]][i - 1];
  }
  for (auto v : e[u]) {
    if (v == fa) continue;
    dfs(v, u);
  }
}
int lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  int d = dep[u] - dep[v];
  for (int i = 0; i <= 17; i++) {
    if (d & (1 << i)) {
      u = anc[u][i];
    }
  }
  if (u == v) return u;
  for (int i = 17; i >= 0; i--) {
    if (anc[u][i] != anc[v][i]) {
      u = anc[u][i];
      v = anc[v][i];
    }
  }
  return anc[u][0];
}
int dist(int u, int v) { return dep[u] + dep[v] - 2 * dep[lca(u, v)]; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  dfs(1, 0);
  int q;
  scanf("%d", &q);
  while (q--) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int dis1 = dist(a, b);
    int dis2 = min(dist(a, x) + 1 + dist(y, b), dist(a, y) + 1 + dist(x, b));
    if (((dis1 & 1) ^ (k & 1)) == 0 && dis1 <= k ||
        ((dis2 & 1) ^ (k & 1)) == 0 && dis2 <= k) {
      printf("YES\n");
    } else
      printf("NO\n");
  }
  return 0;
}
