#include <bits/stdc++.h>
using namespace std;
const int N = 600300, M = 400200;
int lg[N];
void _lg() {
  for (int i = 2; i < N; i <<= 1) lg[i] = 1;
  for (int i = 3; i < N; ++i) lg[i] += lg[i - 1];
}
int st[N][25];
void build(int* a, int n) {
  for (int i = 0; i < n; ++i) st[i][0] = i;
  for (int j = 1; (1 << j) <= n; ++j)
    for (int i = 0; i + (1 << j) < n; ++i) {
      int x = st[i][j - 1];
      int y = st[i + (1 << (j - 1))][j - 1];
      st[i][j] = a[y] < a[x] ? y : x;
    }
}
int get(int l, int r, int* a) {
  int s = r - l;
  int ls = lg[s];
  int x = st[l][ls], y = st[r - (1 << ls)][ls];
  return a[y] < a[x] ? y : x;
}
int head[N], e;
int to[M], nxt[M];
void init(int n) {
  e = 0;
  memset(head + 1, -1, n * sizeof(head[0]));
}
void addEdge(int u, int v) {
  nxt[e] = head[u];
  to[e] = v;
  head[u] = e++;
}
void addBiEdge(int u, int v) {
  addEdge(u, v);
  addEdge(v, u);
}
int id[N], t[N], s[N], c;
int dist[N];
void dfs(int u, int p, int d) {
  s[u] = c, t[c] = d, id[c++] = u;
  dist[u] = d;
  for (int e = head[u]; ~e; e = nxt[e]) {
    int v = to[e];
    if (v == p) continue;
    dfs(v, u, d + 1);
    t[c] = d;
    id[c++] = u;
  }
}
int LCA(int u, int v) {
  int l = s[u];
  int r = s[v];
  if (r < l) swap(l, r);
  int x = get(l, r + 1, t);
  return id[x];
}
int k;
int clc(int u, int v) {
  int lca = LCA(u, v);
  return dist[u] + dist[v] - 2 * dist[lca];
}
bool isb(int d) {
  if (d > k) return false;
  if ((k - d) % 2 == 0) return true;
  return false;
}
bool tr(int u, int v) {
  if (isb(clc(u, v))) return true;
  return false;
}
bool gog(int u, int v, int x, int y) {
  int d1 = clc(u, x);
  int d2 = clc(v, y);
  return isb(d1 + d2 + 1);
}
int main() {
  _lg();
  int n, m, u, v, x, y, a, b;
  cin >> n;
  init(n);
  for (int i = 1; i < n; ++i) {
    scanf("%d %d", &u, &v);
    addBiEdge(u, v);
  }
  dfs(1, 0, 0);
  build(t, c);
  cin >> m;
  while (m--) {
    scanf("%d %d %d %d %d", &x, &y, &a, &b, &k);
    if (tr(a, b))
      cout << "YES\n";
    else if (gog(a, b, x, y))
      cout << "YES\n";
    else if (gog(a, b, y, x))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
