#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int n, q;
vector<int> edge[100005];
int dis[100005];
int father[100005][20];
void dfs(int u, int fa) {
  dis[u] = dis[fa] + 1;
  father[u][0] = fa;
  for (auto i : edge[u]) {
    if (i == fa) continue;
    dfs(i, u);
  }
}
int LCA(int u, int v) {
  if (dis[u] < dis[v]) swap(u, v);
  for (int i = 18; i >= 0; i--) {
    if (dis[father[u][i]] >= dis[v]) {
      u = father[u][i];
    }
  }
  if (u == v) return u;
  for (int i = 18; i >= 0; i--) {
    if (father[u][i] != father[v][i]) {
      u = father[u][i];
      v = father[v][i];
    }
  }
  return father[u][0];
}
int get_dis(int a, int b) { return dis[a] + dis[b] - 2 * dis[LCA(a, b)]; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  dis[0] = 0;
  dfs(1, 0);
  for (int j = 1; j <= 18; j++) {
    for (int i = 1; i <= n; i++) {
      father[i][j] = father[father[i][j - 1]][j - 1];
    }
  }
  scanf("%d", &q);
  while (q--) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int yes = 0;
    int d = get_dis(a, b);
    if (d <= k && d % 2 == k % 2) yes = 1;
    d = get_dis(a, x) + get_dis(b, y) + 1;
    if (d <= k && d % 2 == k % 2) yes = 1;
    d = get_dis(b, x) + get_dis(a, y) + 1;
    if (d <= k && d % 2 == k % 2) yes = 1;
    if (yes)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
