#include <bits/stdc++.h>
using namespace std;
std::unordered_map<int, int> lookup;
struct Node {
  int depth;
  int id;
  std::vector<Node*> parent;
  Node* KStepParent(int k) {
    if (k > depth) {
      return nullptr;
    }
    if (k == 0) {
      return this;
    }
    int lsb = k & (-k);
    return this->parent[lookup[lsb]]->KStepParent(k - lsb);
  }
};
Node* LCA(Node* lhs, Node* rhs) {
  if (lhs->depth != rhs->depth) {
    if (lhs->depth > rhs->depth) {
      lhs = lhs->KStepParent(lhs->depth - rhs->depth);
    } else {
      rhs = rhs->KStepParent(rhs->depth - lhs->depth);
    }
  }
  if (lhs->depth == 0 || lhs == rhs) {
    return lhs;
  }
  int l = 1, r = lhs->depth;
  while (l != r) {
    int mid = (l + r) / 2;
    if (lhs->KStepParent(mid) != rhs->KStepParent(mid)) {
      l = mid + 1;
    } else {
      r = mid;
    }
  }
  return lhs->KStepParent(l);
}
class LCAKaryTree {
 public:
  LCAKaryTree(vector<pair<int, int>>& edges) {
    for (int i = 0; i < 30; ++i) {
      lookup[1 << i] = i;
    }
    n = edges.size() + 1;
    connect.resize(n);
    for (auto& pa : edges) {
      connect[pa.first - 1].push_back(pa.second - 1);
      connect[pa.second - 1].push_back(pa.first - 1);
    }
    for (int i = 0; i < n; ++i) {
      auto ptr = new Node();
      ptr->id = i;
      nodes[i] = ptr;
    }
    nodes[0]->depth = 0;
    for (int nxt : connect[0]) {
      dfs(nodes[nxt], nodes[0]);
    }
  }
  ~LCAKaryTree() {
    for (auto& pa : nodes) {
      delete pa.second;
    }
  }
  int Distance(int x, int y) {
    auto lhs = nodes[x];
    auto rhs = nodes[y];
    auto lca = LCA(lhs, rhs);
    return lhs->depth + rhs->depth - 2 * lca->depth;
  }

 private:
  void dfs(Node* cur, Node* par) {
    cur->depth = par->depth + 1;
    cur->parent.push_back(par);
    int steplog = 0;
    Node* trace = par;
    while (trace->parent.size() > steplog) {
      cur->parent.push_back(trace->parent[steplog]);
      trace = trace->parent[steplog];
      steplog++;
    }
    for (int nxt : connect[cur->id]) {
      if (nxt == par->id) {
        continue;
      }
      dfs(nodes[nxt], cur);
    }
  }
  int n;
  std::vector<std::vector<int>> connect;
  std::map<int, Node*> nodes;
};
bool ok(int distance, int k) { return distance <= k && !((k - distance) & 1); }
class Solver {
 public:
  void solve() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    vector<pair<int, int>> edg;
    cin >> n;
    int l, r;
    for (int i = 1; i < n; ++i) {
      cin >> l >> r;
      edg.emplace_back(l, r);
    }
    LCAKaryTree lca(edg);
    int q;
    cin >> q;
    while (q--) {
      int x, y, a, b, k;
      cin >> x >> y >> a >> b >> k;
      x--;
      y--;
      a--;
      b--;
      int d1 = lca.Distance(a, b);
      if (ok(d1, k)) {
        cout << "YES" << endl;
        continue;
      }
      int d2 = lca.Distance(x, a) + lca.Distance(y, b) + 1;
      if (ok(d2, k)) {
        cout << "YES" << endl;
        continue;
      }
      int d3 = lca.Distance(y, a) + lca.Distance(x, b) + 1;
      if (ok(d3, k)) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
};
int main() {
  Solver sol;
  sol.solve();
  return 0;
}
