#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1000005;
long long int tp[1000005];
int tin[maxn];
int tout[maxn];
int curt = 0;
int const maxl = 19;
int par[maxn][maxl];
int deep[maxn];
vector<long long int> ve[1000005];
void dfs(const int v, const int p = 1) {
  tin[v] = curt++;
  par[v][0] = p;
  deep[v] = deep[p] + 1;
  for (int i = 1; i < maxl; ++i) par[v][i] = par[par[v][i - 1]][i - 1];
  for (int ne : ve[v])
    if (ne != p) dfs(ne, v);
  tout[v] = curt++;
}
inline bool upper(const int x, const int y) {
  return tin[x] <= tin[y] && tout[y] <= tout[x];
}
inline int lca(int x, int y) {
  if (upper(x, y)) return x;
  if (upper(y, x)) return y;
  for (int i = maxl - 1; i >= 0; --i)
    if (!upper(par[x][i], y)) x = par[x][i];
  return par[x][0];
}
inline int dist(const int x, const int y) {
  return deep[x] + deep[y] - 2 * deep[lca(x, y)];
}
bool vis[1000005];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  for (long long int i = 1; i <= n - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    ve[u].push_back(v);
    ve[v].push_back(u);
  }
  dfs(1);
  long long int qq;
  cin >> qq;
  while (qq--) {
    long long int x, y, a, b, k;
    cin >> x >> y >> a >> b >> k;
    long long int dis = dist(a, b);
    if (dis % 2 == k % 2) {
      if (k >= dis) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    long long int minn = dist(a, x) + dist(y, b) + 1;
    if (minn % 2 == k % 2) {
      if (k >= minn) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    minn = dist(b, x) + dist(y, a) + 1;
    if (minn % 2 == k % 2) {
      if (k >= minn) {
        cout << "YES"
             << " " << endl;
        ;
        continue;
      }
    }
    cout << "NO"
         << " " << endl;
    ;
  }
  return 0;
}
