#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
const int mod = 1e9 + 7;
vector<int> g[N];
int par[N][20], dep[N], sz[N], st[N], en[N], T;
void dfs(int u, int pre) {
  par[u][0] = pre;
  dep[u] = dep[pre] + 1;
  st[u] == ++T;
  sz[u] = 1;
  for (int i = 1; i <= 18; i++) par[u][i] = par[par[u][i - 1]][i - 1];
  for (auto v : g[u]) {
    if (v == pre) continue;
    dfs(v, u);
    sz[u] += sz[v];
  }
  en[u] = T;
}
int lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  for (int k = 18; k >= 0; k--)
    if (dep[par[u][k]] >= dep[v]) u = par[u][k];
  if (u == v) return u;
  for (int k = 18; k >= 0; k--)
    if (par[u][k] != par[v][k]) u = par[u][k], v = par[v][k];
  return par[u][0];
}
int kth(int u, int k) {
  assert(k >= 0);
  for (int i = 0; i <= 18; i++)
    if (k & (1 << i)) u = par[u][i];
  return u;
}
int dist(int u, int v) {
  int lc = lca(u, v);
  return dep[u] + dep[v] - 2 * dep[lc];
}
int isanc(int u, int v) { return st[u] <= st[v] && en[v] <= en[u]; }
int nearest(int u, int v, int x) {
  int lc = lca(u, v);
  int d = dist(u, lc);
  int l = 0, r = d, ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (isanc(kth(u, mid), x)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (ans != -1) return kth(u, ans);
  l = 0, r = dist(v, lc), ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (isanc(kth(v, mid), x)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (ans != -1) return kth(v, ans);
  return lc;
}
int32_t main() {
  int n = ({
    int a;
    scanf("%d", &a);
    a;
  });
  for (int i = 1; i < n; i++) {
    int u = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        v = ({
          int a;
          scanf("%d", &a);
          a;
        });
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  dfs(1, 0);
  int q = ({
    int a;
    scanf("%d", &a);
    a;
  });
  while (q--) {
    int x = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        y = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        u = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        v = ({
          int a;
          scanf("%d", &a);
          a;
        }),
        k = ({
          int a;
          scanf("%d", &a);
          a;
        });
    int ans = 0;
    int d = dist(u, v);
    if (d <= k && d % 2 == k % 2) ans = 1;
    int p = nearest(x, y, u), q = nearest(x, y, v);
    int trial = dist(u, p) + dist(p, q) + dist(q, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, p) + dist(x, y) + 1 - dist(p, q) + dist(q, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(p, q) + dist(p, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(x, y) + 1 - dist(p, q) + dist(p, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, x) + dist(x, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, y) + dist(x, y) + dist(x, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, x) + 1 + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, y) + 1 + dist(x, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, p) + dist(p, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(u, q) + dist(q, y) + dist(y, v);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(v, p) + dist(p, x) + dist(x, u);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    trial = dist(v, q) + dist(q, x) + dist(x, u);
    if (trial <= k && trial % 2 == k % 2) ans = 1;
    if (ans)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
