Gildong was hiking a mountain, walking by millions of trees. Inspired by them, he suddenly came up with an interesting idea for trees in data structures: What if we add another edge in a tree?

Then he found that such tree-like graphs are called 1-trees. Since Gildong was bored of solving too many tree problems, he wanted to see if similar techniques in trees can be used in 1-trees as well. Instead of solving it by himself, he's going to test you by providing queries on 1-trees.

First, he'll provide you a tree (not 1-tree) with n vertices, then he will ask you q queries. Each query contains 5 integers: x, y, a, b, and k. This means you're asked to determine if there exists a path from vertex a to b that contains exactly k edges after adding a bidirectional edge between vertices x and y. A path can contain the same vertices and same edges multiple times. All queries are independent of each other; i.e. the added edge in a query is removed in the next query.

Input

The first line contains an integer n (3 ≤ n ≤ 10^5), the number of vertices of the tree.

Next n-1 lines contain two integers u and v (1 ≤ u,v ≤ n, u ≠ v) each, which means there is an edge between vertex u and v. All edges are bidirectional and distinct.

Next line contains an integer q (1 ≤ q ≤ 10^5), the number of queries Gildong wants to ask.

Next q lines contain five integers x, y, a, b, and k each (1 ≤ x,y,a,b ≤ n, x ≠ y, 1 ≤ k ≤ 10^9) – the integers explained in the description. It is guaranteed that the edge between x and y does not exist in the original tree.

Output

For each query, print "YES" if there exists a path that contains exactly k edges from vertex a to b after adding an edge between vertices x and y. Otherwise, print "NO".

You can print each letter in any case (upper or lower).

Example

Input


5
1 2
2 3
3 4
4 5
5
1 3 1 2 2
1 4 1 3 2
1 4 1 3 3
4 2 3 3 9
5 2 3 3 9


Output


YES
YES
NO
YES
NO

Note

The image below describes the tree (circles and solid lines) and the added edges for each query (dotted lines).

<image>

Possible paths for the queries with "YES" answers are: 

  * 1-st query: 1 – 3 – 2 
  * 2-nd query: 1 – 2 – 3 
  * 4-th query: 3 – 4 – 2 – 3 – 4 – 2 – 3 – 4 – 2 – 3 
import java.util.*;
import java.io.*;

public class CFB {
  BufferedReader br;
  PrintWriter out;
  StringTokenizer st;
  boolean eof;
  private static final long MOD = 1000L * 1000L * 1000L + 7;
  private static final int[] dx = {0, -1, 0, 1};
  private static final int[] dy = {1, 0, -1, 0};
  private static final String yes = "Yes";
  private static final String no = "No";

  void solve() {
//    int T = nextInt();
    int T = 1;
    for (int i = 0; i < T; i++) {
      helper();
    }
  }

  // LCA algorithm:
  int LG = 20;
  List<List<Integer>> graph;
  int[] level;
  int[][] dp;
  void helper() {
    int n = nextInt();
    graph = new ArrayList<>();
    for (int i = 0; i < n; i++) {
      graph.add(new ArrayList<>());
    }
    level = new int[n];
    dp = new int[n][LG];
    for (int i = 0; i < n - 1; i++) {
      int u = nextInt() - 1;
      int v = nextInt() - 1;
      graph.get(u).add(v);
      graph.get(v).add(u);
    }

    for (int i = 0; i < n; i++) {
      Arrays.fill(dp[i], -1);
    }
    dfs(0, -1);

    for(int i = 1; i < LG; i++){
      for (int j = 0; j < n; j++) {
        if (dp[j][i - 1] != -1) {
          dp[j][i] = dp[dp[j][i - 1]][i - 1];
        }
      }
    }

    int q = nextInt();
    for (int i = 0; i < q; i++) {
      boolean can = false;
      int x = nextInt() - 1;
      int y = nextInt() - 1;
      int a = nextInt() - 1;
      int b = nextInt() - 1;
      int k = nextInt();
      int d = dis(a, b);
      if (k >= d && (k - d) % 2 == 0) {
        can = true;
      }
      d = dis(a, x) + 1 + dis(b, y);
      if (k >= d && (k - d) % 2 == 0) {
        can = true;
      }
      d = dis(a, y) + 1 + dis(b, x);
      if (k >= d && (k - d) % 2 == 0) {
        can = true;
      }
      outln(can ? yes.toUpperCase() : no.toUpperCase());
    }
  }

  void dfs(int u, int par){
    level[u] = par == -1 ? 0 : 1 + level[par];
    dp[u][0] = par;

    for(int v : graph.get(u)){
      if (v == par) continue;
      dfs(v, u);
    }
  }

  int lca(int u, int v){
    if (level[u] < level[v]) {
      int tmp = u;
      u = v;
      v = tmp;
    }

    int lg = 0;
    while ((1 << lg) <= level[u]) {
      lg++;
    }
    lg--;

    for(int i = lg; i >= 0; i--){
      if (level[u] - (1 << i) >= level[v]) {
        u = dp[u][i];
      }
    }

    if (u == v) {
      return u;
    }

    for(int i = lg; i >= 0; i--){
      if (dp[u][i] != -1 && dp[u][i] != dp[v][i]) {
        u = dp[u][i];
        v = dp[v][i];
      }
    }

    return dp[u][0];
  }

  //make sure u has a deeper depth.
  int dis(int u, int v){
    if (level[u] < level[v]) {
      int tmp = u;
      u = v;
      v = tmp;
    }

    int w = lca(u, v);
    return level[u] + level[v] - 2 * level[w];
  }

  void shuffle(int[] a) {
    int n = a.length;
    for(int i = 0; i < n; i++) {
      int r = i + (int) (Math.random() * (n - i));
      int tmp = a[i];
      a[i] = a[r];
      a[r] = tmp;
    }
  }

  int gcd(int a, int b) {
    while(a != 0 && b != 0) {
      int c = b;
      b = a % b;
      a = c;
    }
    return a + b;
  }
  private void outln(Object o) {
    out.println(o);
  }
  private void out(Object o) {
    out.print(o);
  }
  private void formatPrint(double val) {
    outln(String.format("%.9f%n", val));
  }
  public CFB() {
    br = new BufferedReader(new InputStreamReader(System.in));
    out = new PrintWriter(System.out);
    solve();
    out.close();
  }
  public static void main(String[] args) {
    new CFB();
  }

  public long[] nextLongArr(int n) {
    long[] res = new long[n];
    for(int i = 0; i < n; i++)
      res[i] = nextLong();
    return res;
  }
  public int[] nextIntArr(int n) {
    int[] res = new int[n];
    for(int i = 0; i < n; i++)
      res[i] = nextInt();
    return res;
  }
  public String nextToken() {
    while (st == null || !st.hasMoreTokens()) {
      try {
        st = new StringTokenizer(br.readLine());
      } catch (Exception e) {
        eof = true;
        return null;
      }
    }
    return st.nextToken();
  }
  public String nextString() {
    try {
      return br.readLine();
    } catch (IOException e) {
      eof = true;
      return null;
    }
  }
  public int nextInt() {
    return Integer.parseInt(nextToken());
  }
  public long nextLong() {
    return Long.parseLong(nextToken());
  }
  public double nextDouble() {
    return Double.parseDouble(nextToken());
  }
}