#include <bits/stdc++.h>
using namespace std;
int n, a, b, q, x, y, k;
vector<int> G[100009];
int vis[100009], dist[100009];
int p[100009][20], t[100009];
void DFS(int v) {
  vis[v] = 1;
  for (int i = 0; i < G[v].size(); i++) {
    int w = G[v][i];
    if (vis[w] == 0) {
      t[w] = v;
      dist[w] = dist[v] + 1;
      DFS(w);
    }
  }
}
void make_table() {
  for (int i = 1; i <= n; i++) {
    for (int j = 0; (1 << j) < n; j++) {
      p[i][j] = -1;
    }
  }
  for (int i = 2; i <= n; i++) {
    p[i][0] = t[i];
  }
  for (int j = 1; (1 << j) < n; j++) {
    for (int i = 1; i <= n; i++) {
      if (p[i][j - 1] != -1) {
        p[i][j] = p[p[i][j - 1]][j - 1];
      }
    }
  }
}
int lca(int v, int w) {
  if (dist[v] < dist[w]) {
    swap(v, w);
  }
  int log;
  for (log = 1; (1 << log) < dist[v]; log++)
    ;
  for (int i = log; i >= 0; i--) {
    if (dist[v] - (1 << i) >= dist[w]) v = p[v][i];
  }
  if (v == w) return v;
  for (int i = log; i >= 0; i--) {
    if (p[v][i] != -1 && p[v][i] != p[w][i]) {
      v = p[v][i];
      w = p[w][i];
    }
  }
  return t[v];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  DFS(1);
  make_table();
  cin >> q;
  while (q--) {
    cin >> x >> y >> a >> b >> k;
    int len = dist[a] + dist[b] - 2 * dist[lca(a, b)];
    int mod = abs((dist[a] % 2) - (dist[b] % 2));
    if (k % 2 == mod && len <= k) {
      cout << "YES\n";
      continue;
    }
    len = dist[a] + dist[x] - 2 * dist[lca(a, x)] + 1 + dist[y] + dist[b] -
          2 * dist[lca(y, b)];
    mod = abs((dist[a] % 2) - (dist[x] % 2)) +
          abs((dist[y] % 2) - (dist[b] % 2)) + 1;
    mod %= 2;
    if (k % 2 == mod && len <= k) {
      cout << "YES\n";
      continue;
    }
    len = dist[a] + dist[y] - 2 * dist[lca(a, y)] + 1 + dist[x] + dist[b] -
          2 * dist[lca(x, b)];
    mod = abs((dist[a] % 2) - (dist[y] % 2)) +
          abs((dist[x] % 2) - (dist[b] % 2)) + 1;
    mod %= 2;
    if (k % 2 == mod && len <= k) {
      cout << "YES\n";
      continue;
    }
    cout << "NO\n";
  }
}
