#include <bits/stdc++.h>
using namespace std;
struct LCA {
  vector<int> height, euler, first, segtree, parent;
  vector<bool> visited;
  int n;
  LCA(vector<vector<int> > &adj, int root = 0) {
    n = adj.size();
    height.resize(n);
    first.resize(n);
    parent.resize(n);
    euler.reserve(n * 2);
    visited.assign(n, false);
    parent[root] = -1;
    dfs(adj, root);
    int m = euler.size();
    segtree.resize(m * 4);
    build(1, 0, m - 1);
  }
  void dfs(vector<vector<int> > &adj, int node, int h = 0) {
    visited[node] = true;
    height[node] = h;
    first[node] = euler.size();
    euler.push_back(node);
    for (auto to : adj[node]) {
      if (!visited[to]) {
        parent[to] = node;
        dfs(adj, to, h + 1);
        euler.push_back(node);
      }
    }
  }
  void build(int node, int b, int e) {
    if (b == e) {
      segtree[node] = euler[b];
    } else {
      int mid = (b + e) / 2;
      build(node << 1, b, mid);
      build(node << 1 | 1, mid + 1, e);
      int l = segtree[node << 1], r = segtree[node << 1 | 1];
      segtree[node] = (height[l] < height[r]) ? l : r;
    }
  }
  int query(int node, int b, int e, int L, int R) {
    if (b > R || e < L) return -1;
    if (b >= L && e <= R) return segtree[node];
    int mid = (b + e) >> 1;
    int left = query(node << 1, b, mid, L, R);
    int right = query(node << 1 | 1, mid + 1, e, L, R);
    if (left == -1) return right;
    if (right == -1) return left;
    return height[left] < height[right] ? left : right;
  }
  int lca(int u, int v) {
    int left = first[u], right = first[v];
    if (left > right) swap(left, right);
    return query(1, 0, euler.size() - 1, left, right);
  }
};
void solve() {
  int n;
  cin >> n;
  vector<vector<int> > adj(n);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  LCA Tree(adj, 0);
  auto dis = [&](int u, int v) {
    int lc = Tree.lca(u, v);
    return Tree.height[u] + Tree.height[v] - 2 * Tree.height[lc];
  };
  int q;
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    x--, y--, a--, b--;
    bool ok = false;
    vector<int> pos;
    int ab = dis(a, b);
    int ax = dis(a, x);
    int ay = dis(a, y);
    int bx = dis(b, x);
    int by = dis(b, y);
    pos.push_back(ab);
    pos.push_back(ax + 1 + by);
    pos.push_back(ax + 1 + ay + ab);
    pos.push_back(ay + 1 + bx);
    ;
    for (auto &d : pos) {
      if (d <= k) {
        ok |= ((d & 1) == (k & 1));
      }
    }
    if (ok) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
