#include <bits/stdc++.h>
using namespace std;
const int K = 20;
const int N = 1e5 + 7;
vector<int> g[N];
int h[N];
int tin[N];
int tout[N];
int p[N];
int up[K][N];
int timer = 0;
void dfs(int cur, int pr, int ch) {
  h[cur] = ch;
  p[cur] = pr;
  tin[cur] = timer;
  timer++;
  for (auto t : g[cur]) {
    if (t != p[cur]) {
      dfs(t, cur, ch + 1);
    }
  }
  tout[cur] = timer;
  timer++;
}
void init(int n) {
  for (int i = 0; i < n; i++) {
    up[0][i] = p[i];
  }
  for (int i = 1; i < K; i++) {
    for (int j = 0; j < n; j++) {
      int mid = up[i - 1][j];
      if (mid != -1) {
        up[i][j] = up[i - 1][mid];
      } else {
        up[i][j] = -1;
      }
    }
  }
}
bool anc(int u, int v) { return tin[u] <= tin[v] && tout[v] <= tout[u]; }
int get(int a, int b) {
  if (anc(a, b)) {
    return a;
  } else if (anc(b, a)) {
    return b;
  } else {
    for (int i = K - 1; i >= 0; i--) {
      if (up[i][a] != -1 && !anc(up[i][a], b)) {
        a = up[i][a];
      }
    }
    return p[a];
  }
}
int ln(int a, int b) { return h[a] + h[b] - 2 * h[get(a, b)]; }
int ok(int ln, int k) { return ln <= k && (ln % 2) == (k % 2); }
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i + 1 < n; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0, -1, 0);
  init(n);
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    x--;
    y--;
    a--;
    b--;
    int ans = 0;
    ans |= ok(ln(a, b), k);
    ans |= ok(ln(a, x) + 1 + ln(y, b), k);
    swap(x, y);
    ans |= ok(ln(a, x) + 1 + ln(y, b), k);
    if (ans)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
