#include <bits/stdc++.h>
using namespace std;
int dep[111111];
pair<int, int> dp[111111][18];
vector<int> v[111111];
void recur(int now, int left, int num) {
  dep[now] = num;
  dp[now][0] = make_pair(left, 1);
  for (int e = 0; e < v[now].size(); e++) {
    int next = v[now][e];
    if (next != left) {
      recur(next, now, num + 1);
    }
  }
}
int getdist(int a, int b) {
  if (dep[a] < dep[b]) swap(a, b);
  int diff = dep[a] - dep[b];
  int num = 0, dist = 0;
  for (; diff != 0;) {
    if (diff % 2) {
      dist += dp[a][num].second;
      a = dp[a][num].first;
    }
    num++;
    diff /= 2;
  }
  if (a != b) {
    for (int p = 17; p >= 0; p--) {
      if (dp[a][p].first != dp[b][p].first) {
        dist += dp[a][p].second;
        dist += dp[b][p].second;
        a = dp[a][p].first;
        b = dp[b][p].first;
      }
    }
    dist += dp[a][0].second;
    dist += dp[b][0].second;
    a = dp[a][0].first;
    b = dp[b][0].first;
  }
  return dist;
}
bool can(int x, int y, int a) {
  int f1 = getdist(x, y);
  int a1 = getdist(x, a), a2 = getdist(y, a);
  if (a1 + a2 == f1) return true;
  return false;
}
int main(void) {
  memset(dp, -1, sizeof(dp));
  int n;
  scanf("%d", &n);
  for (int e = 0; e < n - 1; e++) {
    int a, b;
    scanf("%d%d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  recur(1, -1, 1);
  for (int e = 1; e < 18; e++) {
    for (int p = 1; p <= n; p++) {
      if (dp[p][e - 1].first != -1) {
        dp[p][e].first = dp[dp[p][e - 1].first][e - 1].first;
        dp[p][e].second =
            dp[dp[p][e - 1].first][e - 1].second + dp[p][e - 1].second;
      }
    }
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    int x, y, a, b, k;
    scanf("%d%d%d%d%d", &a, &b, &x, &y, &k);
    int f1 = getdist(x, y);
    if (f1 <= k && (k - f1) % 2 == 0) {
      printf("YES\n");
      continue;
    } else {
      int a1 = getdist(a, x) + 1 + getdist(b, y);
      int a2 = getdist(a, y) + 1 + getdist(b, x);
      if (a1 <= k && (k - a1) % 2 == 0)
        printf("YES\n");
      else if (a2 <= k && (k - a2) % 2 == 0)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
  return 0;
}
