#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> edge;
vector<int> dist;
vector<int> et;
vector<int> first;
void inedge(int n, int m) {
  edge.resize(n + 1);
  dist.resize(n + 1, -1);
  first.resize(n + 1);
  int a, b;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    edge[a].push_back(b);
    edge[b].push_back(a);
  }
}
void dfs(int v, int p, int h) {
  if (dist[v] != -1) return;
  dist[v] = h;
  first[v] = et.size();
  et.push_back(v);
  for (int i = 0; i < edge[v].size(); i++) {
    if (p - edge[v][i]) {
      dfs(edge[v][i], v, h + 1);
      et.push_back(v);
    }
  }
}
vector<int> t;
int n;
void build(vector<int>& vv) {
  n = vv.size();
  t.resize(2 * n, INT_MAX);
  for (int i = 0; i < n; i++) t[i + n] = vv[i];
  for (int i = n - 1; i > 0; i--) {
    t[i] = min(t[i << 1], t[i << 1 | 1]);
  }
}
int rq(int l, int r) {
  int res = INT_MAX;
  r++;
  for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
    if (l & 1) res = min(res, t[l++]);
    if (r & 1) res = min(res, t[--r]);
  }
  return res;
}
int dt(int a, int b) {
  if (first[a] > first[b]) swap(a, b);
  int dlca = rq(first[a], first[b]);
  return dist[a] + dist[b] - 2 * dlca;
}
int main() {
  int n;
  cin >> n;
  inedge(n, n - 1);
  dfs(1, -1, 0);
  vector<int> vv;
  for (int i = 0; i < et.size(); i++) vv.push_back(dist[et[i]]);
  build(vv);
  int q, x, y, a, b, k;
  cin >> q;
  while (q--) {
    cin >> x >> y >> a >> b >> k;
    int d1 = dt(a, b);
    int d2 = dt(a, x) + dt(y, b) + 1;
    int d3 = dt(a, y) + dt(x, b) + 1;
    if (d1 <= k && (d1 % 2 == k % 2)) {
      cout << "YES\n";
    } else if (d2 <= k && (d2 % 2 == k % 2)) {
      cout << "YES\n";
    } else if (d3 <= k && (d3 % 2 == k % 2)) {
      cout << "YES\n";
    } else
      cout << "NO\n";
  }
}
