#include <bits/stdc++.h>
using namespace std;
int ri() {
  int x;
  if (scanf(" %d", &x) == EOF) return -1;
  return x;
}
long long int rl() {
  long long int x;
  if (cin >> x) return x;
  return -1;
}
string rs() {
  string s;
  if (cin >> s) return s;
  return "";
}
struct Minimum {
  int x;
  static const int INF = (1 << 29);
  Minimum(int x) : x(x) {}
  Minimum() : x(INF) {}
  static Minimum identity() { return Minimum(INF); }
  static Minimum make(const int& x) { return Minimum(x); }
  static Minimum combine(Minimum a, Minimum b) {
    return Minimum(min(a.x, b.x));
  }
  void print() { printf("{Minimum = %lld}", x); }
};
template <typename Data, typename Input>
class SegmentTree {
 private:
  int n;
  vector<Data> dv;

 public:
  SegmentTree(const vector<Input>& input) {
    n = input.size();
    int vectorSize = 1;
    while (vectorSize < n) {
      vectorSize *= 2;
    }
    vectorSize *= 2;
    dv = vector<Data>(vectorSize, Data::identity());
    build(input, 0, 0, n);
  }
  void update(int x, Input& val) { update(x, val, 0, 0, n); }
  void update(int left, int right, Input& val) { assert(false); }
  Data query(int left, int right) {
    assert(left >= 0 && right <= n);
    return query(0, 0, n, left, right);
  }
  void print() {
    printf("Tree size for n = %d is %d\n", n, dv.size());
    for (auto& d : dv) {
      d.print();
      cout << " ";
    }
    cout << endl;
  }

 private:
  Data query(int root, int tl, int tr, int l, int r) {
    if (l >= r) {
      return Data::identity();
    }
    if (l == tl && r == tr) {
      return dv[root];
    }
    int tm = (tl + tr + 1) / 2;
    Data left = query(2 * root + 1, tl, tm, l, min(r, tm));
    Data right = query(2 * root + 2, tm, tr, max(tm, l), r);
    return Data::combine(left, right);
  }
  void update(int x, Input& val, int root, int tl, int tr) {
    if (tl == tr - 1) {
      dv[root] = Data::make(val);
      return;
    }
    int tm = (tl + tr + 1) / 2;
    if (x < tm)
      update(x, val, 2 * root + 1, tl, tm);
    else
      update(x, val, 2 * root + 2, tm, tr);
    dv[root] = Data::combine(dv[2 * root + 1], dv[2 * root + 2]);
  }
  Data build(const vector<Input>& values, int root, int tl, int tr) {
    if (tl == tr - 1) {
      return dv[root] = Data::make(values[tl]);
    }
    int tm = (tl + tr + 1) / 2;
    Data left = build(values, 2 * root + 1, tl, tm);
    Data right = build(values, 2 * root + 2, tm, tr);
    return dv[root] = Data::combine(left, right);
  }
};
struct Tree {
  int n;
  SegmentTree<Minimum, int> lcaTree;
  vector<vector<int> > edges;
  vector<int> firstPos;
  vector<int> heights;
  Tree(int n) : n(n), lcaTree(vector<int>(1, 1)), edges(n), firstPos(n, -1) {}
  void readInput() {
    for (int i = 0; i < n; ++i)
      if (i) {
        int u = ri() - 1;
        int v = ri() - 1;
        edges[u].push_back(v);
        edges[v].push_back(u);
      }
  }
  void solveQueries() {
    int q = ri();
    for (int i = 0; i < q; ++i) {
      int nu = ri() - 1;
      int nv = ri() - 1;
      int a = ri() - 1;
      int b = ri() - 1;
      int K = ri();
      solveQuery(nu, nv, a, b, K);
    }
  }
  int d(int u, int v) {
    int fu = firstPos[u], fv = firstPos[v];
    if (fu > fv) swap(fu, fv);
    int hu = heights[fu], hv = heights[fv];
    int hc = lcaTree.query(fu, fv + 1).x;
    int ret = (hu - hc) + (hv - hc);
    return ret;
  }
  void solveQuery(int nu, int nv, int a, int b, int K) {
    int p1 = d(a, b);
    int p2 = d(a, nu) + 1 + d(nv, b);
    int p3 = d(a, nv) + 1 + d(nu, b);
    vector<int> temp = {p1, p2, p3};
    assert(temp.size() == 3);
    vector<int> D(2, 1000000009);
    for (auto x : temp) {
      if (x < D[x % 2]) D[x % 2] = x;
    }
    bool possible = (K >= D[K % 2]);
    string ret = possible ? "YES" : "NO";
    cout << ret << endl;
  }
  void precompute() {
    doit(0, -1, 0, heights);
    lcaTree = {heights};
  }
  void doit(int u, int parent, int h, vector<int>& heights) {
    if (firstPos[u] < 0) firstPos[u] = heights.size();
    heights.push_back(h);
    for (auto v : edges[u])
      if (v != parent) {
        doit(v, u, h + 1, heights);
        heights.push_back(h);
      }
  }
};
struct SingleCase {
  int n;
  bool solveCase() {
    n = ri();
    if (n < 0) return false;
    Tree tree(n);
    tree.readInput();
    tree.precompute();
    tree.solveQueries();
    return true;
  }
};
int main() {
  while (SingleCase().solveCase()) {
  };
  return 0;
}
