#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T& a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T& a, T b) {
  return a < b ? (a = b, true) : false;
}
const int nax = 1 << 17;
const int LOG = 17;
vector<int> G[nax];
int N, Q;
int in[nax], out[nax], dep[nax];
int jmp[nax][LOG + 1];
int TIME;
void dfs(int v, int p) {
  in[v] = ++TIME;
  jmp[v][0] = p;
  for (int i = 1; i <= LOG; ++i) jmp[v][i] = jmp[jmp[v][i - 1]][i - 1];
  for (int ch : G[v]) {
    if (ch == p) continue;
    dep[ch] = dep[v] + 1;
    dfs(ch, v);
  }
  out[v] = ++TIME;
}
inline bool is_ancestor(int u, int v) {
  return in[u] <= in[v] && out[u] >= out[v];
}
int lca(int u, int v) {
  if (is_ancestor(u, v)) return u;
  if (is_ancestor(v, u)) return v;
  for (int i = LOG; i >= 0; --i)
    if (!is_ancestor(jmp[u][i], v)) u = jmp[u][i];
  return jmp[u][0];
}
inline int dist(int u, int v) { return dep[u] + dep[v] - 2 * dep[lca(u, v)]; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = 0; i < N - 1; ++i) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, 1);
  cin >> Q;
  for (int tt = 1; tt <= Q; ++tt) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    int bef = dist(a, b);
    int aft = min(dist(a, x) + dist(y, b), dist(a, y) + dist(x, b)) + 1;
    int valid_dist = 1e9 + 10;
    if (bef % 2 == k % 2) uin(valid_dist, bef);
    if (aft % 2 == k % 2) uin(valid_dist, aft);
    cout << (valid_dist <= k ? "YES" : "NO") << '\n';
  }
}
