#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> adj[N];
int lvl[N], anc[N][25];
int n;
void dfs(int u = 0, int par = 0, int l = 0) {
  lvl[u] = l;
  anc[u][0] = par;
  for (auto nxt : adj[u])
    if (nxt != par) dfs(nxt, u, l + 1);
}
void buildLCA() {
  int lg = ceil(log2(n));
  for (int j = 1; j < lg; j++)
    for (int i = 0; i < n; i++) anc[i][j] = anc[anc[i][j - 1]][j - 1];
}
int LCA(int i, int j) {
  int lg = ceil(log2(n));
  int st = lg;
  if (lvl[i] > lvl[j]) swap(i, j);
  int cur = lvl[j];
  for (; st >= 0; st--)
    if (cur - (1 << st) >= lvl[i]) cur -= (1 << st), j = anc[j][st];
  if (i == j) return 2 * i - j;
  cur = lvl[i];
  for (st = lg; st >= 0; st--)
    if (anc[i][st] != anc[j][st])
      cur -= (1 << st), i = anc[i][st], j = anc[j][st];
  return anc[i][0];
}
int dis(int a, int b) { return lvl[a] + lvl[b] - 2 * lvl[LCA(a, b)]; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> n;
  int a, b;
  for (int i = 0; i < int(n - 1); i++) {
    cin >> a >> b;
    a--, b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs();
  buildLCA();
  cin >> q;
  while (q--) {
    int x, y, a, b, k;
    cin >> a >> b >> x >> y >> k;
    x--, y--, a--, b--;
    {
      int d = dis(x, y);
      if (d <= k && (k - d) % 2 == 0) {
        cout << "YES" << '\n';
        continue;
      }
    }
    {
      int d = dis(x, a) + dis(y, b) + 1;
      if (d <= k && (k - d) % 2 == 0) {
        cout << "YES" << '\n';
        continue;
      }
    }
    {
      int d = dis(x, b) + dis(y, a) + 1;
      if (d <= k && (k - d) % 2 == 0) {
        cout << "YES" << '\n';
        continue;
      }
    }
    cout << "NO" << '\n';
  }
  return 0;
}
