#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::string;
int n, m, d;
int ver[200010], next[200010], head[200010], tot;
int dis[100010], fa[100010][20];
inline void link(int x, int y) {
  ver[++tot] = y, next[tot] = head[x], head[x] = tot;
}
inline void dfs(int now, int father) {
  dis[now] = dis[father] + 1, fa[now][0] = father;
  for (register int i = head[now]; i; i = next[i]) {
    if (ver[i] != father) dfs(ver[i], now);
  }
  return;
}
inline int LCA(int x, int y) {
  if (dis[x] < dis[y]) std::swap(x, y);
  int tx = x, ty = y;
  for (register int i = d; i >= 0; --i) {
    if (dis[fa[x][i]] >= dis[y]) x = fa[x][i];
  }
  if (x != y) {
    for (register int i = d; i >= 0; --i) {
      if (fa[x][i] != fa[y][i]) x = fa[x][i], y = fa[y][i];
    }
    x = fa[x][0];
  }
  return std::abs(dis[x] - dis[tx]) + std::abs(dis[x] - dis[ty]);
}
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int x, y, a, b, l;
  cin >> n;
  for (register int i = 1; i < n; ++i) {
    cin >> x >> y;
    link(x, y), link(y, x);
  }
  while ((1 << d) <= n) ++d;
  dfs(x, 0);
  for (register int j = 1; j <= d; ++j) {
    for (register int i = 1; i <= n; ++i) {
      fa[i][j] = fa[fa[i][j - 1]][j - 1];
    }
  }
  cin >> m;
  for (register int i = 1; i <= m; ++i) {
    cin >> x >> y >> a >> b >> l;
    int l1 = LCA(a, b), l2 = LCA(a, x) + LCA(b, y) + 1,
        l3 = LCA(b, x) + LCA(a, y) + 1;
    if (l1 <= l && l1 % 2 == l % 2)
      cout << "YES\n";
    else if (l2 <= l && l2 % 2 == l % 2)
      cout << "YES\n";
    else if (l3 <= l && l3 % 2 == l % 2)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
