#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 5;
int n, d[N], f[N][25], v[N], lg, k, m, tot, head[N], a, b;
void read(int &x) {
  long long f = 0;
  x = 0;
  char ch = getchar();
  for (; !(ch >= '0' && ch <= '9'); ch = getchar()) f |= ch == '-';
  for (; (ch >= '0' && ch <= '9'); ch = getchar())
    x = (x << 3) + (x << 1) + (ch ^ 48);
  x = (f) ? -x : x;
}
struct data {
  int to, next;
} e[N];
void add(int x, int y) {
  e[++tot].to = y;
  e[tot].next = head[x];
  head[x] = tot;
}
void dfs(int x) {
  v[x] = 1;
  for (int i = head[x]; i; i = e[i].next) {
    int y = e[i].to;
    if (v[y]) continue;
    d[y] = d[x] + 1;
    f[y][0] = x;
    dfs(y);
  }
}
int lca(int x, int y) {
  if (d[x] < d[y]) swap(x, y);
  for (int i = lg; i >= 0; i--)
    if (d[f[x][i]] >= d[y]) x = f[x][i];
  if (x == y) return y;
  for (int i = lg; i >= 0; i--)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
bool q(int g) {
  if (g <= k) return (g % 2 == k % 2) ? 1 : 0;
  return 0;
}
int ro(int x, int y) {
  int root = lca(x, y);
  return (d[x] - d[root]) + (d[y] - d[root]);
}
int main() {
  read(n);
  for (int i = 1; i < n; i++) {
    int x, y;
    read(x), read(y);
    add(x, y);
    add(y, x);
  }
  d[1]++;
  f[1][0] = 1;
  dfs(1);
  lg = 20;
  for (int j = 1; j <= lg; j++)
    for (int i = 1; i <= n; i++) f[i][j] = f[f[i][j - 1]][j - 1];
  read(m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    read(x), read(y), read(a), read(b), read(k);
    int fi = ro(a, b);
    int s = ro(a, x) + ro(y, b) + 1;
    int t = ro(a, y) + ro(x, b) + 1;
    if (q(fi) || q(s) || q(t))
      printf("YES\n");
    else
      printf("NO\n");
  }
}
