#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, T, x, y, a, b, k;
vector<int> vec[N];
int dep[N];
int f[N][30];
void dfs(int x, int fa) {
  dep[x] = dep[fa] + 1;
  for (int i = 0; i < 20; ++i) f[x][i + 1] = f[f[x][i]][i];
  for (int i = 0; i < vec[x].size(); ++i) {
    int t = vec[x][i];
    if (t == fa) continue;
    f[t][0] = x;
    dfs(t, x);
  }
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (int i = 20; i >= 0; --i) {
    if (dep[f[x][i]] >= dep[y]) x = f[x][i];
    if (x == y) return x;
  }
  for (int i = 20; i >= 0; --i) {
    if (f[x][i] != f[y][i]) {
      x = f[x][i];
      y = f[y][i];
    }
  }
  return f[x][0];
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    vec[u].emplace_back(v);
    vec[v].emplace_back(u);
  }
  dfs(1, 0);
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d%d%d", &a, &b, &x, &y, &k);
    int p = lca(x, y);
    int dis = dep[x] + dep[y] - 2 * dep[p];
    if (k >= dis && (k - dis) % 2 == 0) {
      puts("YES");
      continue;
    }
    int p1 = lca(x, a);
    int dis1 = dep[x] + dep[a] - 2 * dep[p1];
    int p2 = lca(y, b);
    int dis2 = dep[y] + dep[b] - 2 * dep[p2];
    dis = dis1 + dis2 + 1;
    if (k >= dis && (k - dis) % 2 == 0) {
      puts("YES");
      continue;
    }
    p1 = lca(x, b);
    dis1 = dep[x] + dep[b] - 2 * dep[p1];
    p2 = lca(y, a);
    dis2 = dep[y] + dep[a] - 2 * dep[p2];
    dis = dis1 + dis2 + 1;
    if (k >= dis && (k - dis) % 2 == 0) {
      puts("YES");
      continue;
    }
    puts("NO");
  }
  return 0;
}
