#include <bits/stdc++.h>
using namespace std;
const int N = 200050;
int n, q;
struct edge {
  int v, nxt;
} e[N << 1];
int head[N], ecnt;
inline void ad(int u, int v) {
  e[++ecnt].v = v;
  e[ecnt].nxt = head[u];
  head[u] = ecnt;
}
int dep[N], f[N][23];
void dfs(int u, int father) {
  dep[u] = dep[father] + 1;
  for (int i = 1; (1 << i) <= dep[u]; i++) {
    f[u][i] = f[f[u][i - 1]][i - 1];
  }
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == father) continue;
    f[v][0] = u;
    dfs(v, u);
  }
}
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 getdis(int x, int y) { return dep[x] + dep[y] - 2 * dep[lca(x, y)]; }
int k;
bool check(int d) {
  if (d > k) return false;
  if ((k - d) % 2 == 0)
    return true;
  else
    return false;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    ad(x, y), ad(y, x);
  }
  dfs(1, 0);
  cin >> q;
  int dis[5] = {0};
  while (q--) {
    int x, y, a, b;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    dis[1] = getdis(a, b);
    dis[2] = getdis(x, a) + getdis(b, y) + 1;
    dis[3] = getdis(x, b) + getdis(a, y) + 1;
    if (check(dis[1]) || check(dis[2]) || check(dis[3])) {
      puts("YES");
    } else
      puts("NO");
  }
  return 0;
}
