#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 5;
const int poww = 23;
int head[maxn];
int cnt;
int d[maxn];
int p[maxn][poww];
vector<int> v;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
struct node {
  int to;
  int next;
} e[maxn * 2];
void init() {
  memset(head, -1, sizeof(head));
  cnt = 0;
}
void add(int u, int v) {
  e[cnt].to = v;
  e[cnt].next = head[u];
  head[u] = cnt++;
  e[cnt].to = u;
  e[cnt].next = head[v];
  head[v] = cnt++;
}
void dfs(int u, int fa) {
  d[u] = d[fa] + 1;
  p[u][0] = fa;
  for (int i = 1; i < poww; i++) {
    p[u][i] = p[p[u][i - 1]][i - 1];
  }
  for (int i = head[u]; i + 1; i = e[i].next) {
    if (e[i].to == fa) continue;
    dfs(e[i].to, u);
  }
}
int lca(int a, int b) {
  if (d[a] > d[b]) swap(a, b);
  int dis = d[b] - d[a];
  for (int i = 0; i < poww; i++)
    if (dis & (1 << i)) b = p[b][i];
  if (a == b) return a;
  for (int i = poww - 1; i >= 0; i--) {
    if (p[a][i] != p[b][i]) a = p[a][i], b = p[b][i];
  }
  return p[b][0];
}
int qiu(int x, int y) {
  int tmp = lca(x, y);
  return d[x] + d[y] - 2 * d[tmp];
}
int main() {
  int n;
  while (cin >> n) {
    int x, y, a, b, k;
    init();
    for (int i = 1; i < n; i++) {
      int x, y;
      scanf("%d%d", &x, &y);
      add(x, y);
    }
    int q;
    cin >> q;
    dfs(1, 0);
    for (int j = 1; j <= 18; ++j)
      for (int i = 1; i <= n; ++i) p[i][j] = p[p[i][j - 1]][j - 1];
    for (int i = 0; i < q; i++) {
      x = read();
      y = read();
      a = read();
      b = read();
      k = read();
      v.clear();
      int tmp1 = qiu(x, a);
      int tmp2 = qiu(y, b);
      int dis1 = tmp1 + tmp2 + 1;
      tmp1 = qiu(y, a);
      tmp2 = qiu(x, b);
      int dis2 = tmp1 + tmp2 + 1;
      int dis3 = qiu(a, b);
      if (dis1 <= k) v.push_back(dis1);
      if (dis2 <= k) v.push_back(dis2);
      if (dis3 <= k) v.push_back(dis3);
      int flag = 0;
      if (v.size() > 0) {
        for (int i = 0; i < v.size(); i++) {
          if (v[i] % 2 == k % 2) {
            flag = 1;
          }
        }
      }
      if (flag)
        cout << "YES" << endl;
      else {
        cout << "NO" << endl;
      }
    }
  }
}
