#include <bits/stdc++.h>
using namespace std;
const int NIL = -1;
template <class T>
inline T mx(T a, T b) {
  return a > b ? a : b;
}
template <class T>
inline T mi(T a, T b) {
  return a < b ? a : b;
}
template <class T>
inline void sw(T &a, T &b) {
  T t = a;
  a = b;
  b = t;
}
template <class T>
inline T mabs(T x) {
  return x < 0 ? -x : x;
}
inline char gc() {
  char ret;
  while ((ret = getchar()) == ' ' || ret == '\n' || ret == '\t')
    ;
  return ret;
}
template <class T>
inline T sq(T x) {
  return x * x;
}
int n;
const int lim = 1e5 + 10;
int fa[lim][40], dept[lim];
vector<int> adj[lim];
void dfs(int u, int f) {
  dept[u] = dept[f] + 1;
  int v;
  fa[u][0] = f;
  for (int i = 1; i < 32; ++i) fa[u][i] = fa[fa[u][i - 1]][i - 1];
  for (int i = 0; i < adj[u].size(); i++) {
    v = adj[u][i];
    if (v == f) continue;
    dfs(v, u);
  }
}
int lca(int x, int y) {
  if (dept[x] < dept[y]) sw(x, y);
  for (int i = 32; i >= 0; i--) {
    if (dept[fa[x][i]] >= dept[y]) x = fa[x][i];
    if (x == y) return x;
  }
  for (int i = 32; i >= 0; i--) {
    if (fa[x][i] != fa[y][i]) x = fa[x][i], y = fa[y][i];
  }
  return fa[x][0];
}
int dist(int x, int y) {
  int c = lca(x, y);
  return dept[x] + dept[y] - 2 * dept[c];
}
int main() {
  scanf("%d", &n);
  int u, v;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    adj[u].push_back(v), adj[v].push_back(u);
  }
  dfs(1, 0);
  int q, x, y, a, b, k;
  scanf("%d", &q);
  while (q--) {
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    bool flag = false;
    int tmp = k - dist(a, b);
    if (tmp >= 0 && !(tmp & 1)) flag = true;
    if (!flag) {
      tmp = k - dist(a, x) - dist(y, b) - 1;
      if (tmp >= 0 && !(tmp & 1)) flag = true;
    }
    if (!flag) {
      tmp = k - dist(a, y) - dist(x, b) - 1;
      if (tmp >= 0 && !(tmp & 1)) flag = true;
    }
    printf("%s\n", flag ? "YES" : "NO");
  }
  return 0;
}
