#include <bits/stdc++.h>
using namespace std;
const int maxn = 10e5 + 5;
int n;
vector<int> G[maxn];
int f[18][maxn];
int d[maxn];
void dfs(int x) {
  for (int i = 0; i < G[x].size(); i++) {
    int v = G[x][i];
    if (v == f[0][x]) continue;
    f[0][v] = x;
    d[v] = d[x] + 1;
    dfs(v);
  }
}
int lca(int x, int y) {
  if (d[x] < d[y]) swap(x, y);
  for (int i = 17; i >= 0; i--) {
    if (d[x] - (1 << i) >= d[y]) x = f[i][x];
  }
  if (x == y) return x;
  for (int i = 17; i >= 0; i--) {
    if (f[i][x] != f[i][y]) {
      x = f[i][x];
      y = f[i][y];
    }
  }
  return f[0][x];
}
int dis(int x, int y) { return d[x] + d[y] - 2 * d[lca(x, y)]; }
bool check(int x, int y) { return y >= x && ((x % 2) == (y % 2)); }
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  dfs(1);
  for (int i = 1; i <= 17; i++) {
    for (int j = 1; j <= n; j++) {
      f[i][j] = f[i - 1][f[i - 1][j]];
    }
  }
  int t;
  cin >> t;
  while (t--) {
    int x1, y1, a1, b1, dist1;
    cin >> x1 >> y1 >> a1 >> b1 >> dist1;
    if (check(dis(a1, b1), dist1) ||
        check(dis(a1, x1) + dis(y1, b1) + 1, dist1) ||
        check(dis(a1, y1) + dis(x1, b1) + 1, dist1))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
