#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mo = 1e9 + 7;
const int inf = 1e9;
int f[18][N], h[N];
vector<int> p[N];
void dfs(int x) {
  for (auto& i : p[x])
    if (i != f[0][x]) {
      f[0][i] = x;
      h[i] = h[x] + 1;
      dfs(i);
    }
}
int lca(int x, int y) {
  if (h[x] < h[y]) swap(x, y);
  for (auto i = (17); i >= (0); --i)
    if (((h[x] - h[y]) >> i) & 1) x = f[i][x];
  if (x == y) return x;
  for (auto 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 h[x] + h[y] - h[lca(x, y)] * 2; }
bool ok(int x, int y) { return y >= x && x % 2 == y % 2; }
int main() {
  int n, q;
  scanf("%d", &n);
  for (auto i = (2); i <= (n); ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    p[x].push_back(y);
    p[y].push_back(x);
  }
  dfs(1);
  for (auto i = (1); i <= (17); ++i)
    for (auto j = (1); j <= (n); ++j) f[i][j] = f[i - 1][f[i - 1][j]];
  scanf("%d", &q);
  for (auto i = (1); i <= (q); ++i) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &x, &y, &a, &b, &k);
    printf("%s\n", (ok(dis(a, b), k) || ok(dis(a, x) + dis(b, y) + 1, k) ||
                    ok(dis(a, y) + dis(b, x) + 1, k))
                       ? "YES"
                       : "NO");
  }
}
