#include <bits/stdc++.h>
using namespace std;
int n, m, f[100100][30], dep[100100];
int cnt, bg[100100], ne[200100], to[200100];
void add(int x, int y) {
  cnt++;
  ne[cnt] = bg[x];
  to[cnt] = y;
  bg[x] = cnt;
}
void dfs(int x, int fa) {
  f[x][0] = fa;
  dep[x] = dep[fa] + 1;
  for (int i = bg[x]; i; i = ne[i]) {
    int y = to[i];
    if (y != fa) {
      dfs(y, x);
    }
  }
}
void ycl() {
  for (int j = 1; j <= 25; j++) {
    for (int i = 1; i <= n; i++) {
      f[i][j] = f[f[i][j - 1]][j - 1];
    }
  }
}
int get_le(int x, int y) {
  if (dep[x] < dep[y]) {
    swap(x, y);
  }
  int sum = 0;
  for (int i = 25; i >= 0; i--) {
    if (dep[f[x][i]] >= dep[y]) {
      sum += (1 << i);
      x = f[x][i];
    }
  }
  if (x == y) {
    return sum;
  }
  for (int i = 25; i >= 0; i--) {
    if (f[x][i] != f[y][i]) {
      x = f[x][i], y = f[y][i];
      sum += (1 << i) * 2;
    }
  }
  return sum + 2;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  ycl();
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    int q1, q2, q3;
    q1 = get_le(a, b);
    q2 = get_le(a, x) + get_le(b, y) + 1;
    q3 = get_le(b, x) + get_le(a, y) + 1;
    if ((q1 <= k && q1 % 2 == k % 2) || (q2 <= k && q2 % 2 == k % 2) ||
        (q3 <= k && q3 % 2 == k % 2)) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
  return 0;
}
