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 E620
{
    static int memo[][];
    static int [] depth;
    static ArrayList<Integer> [] adj;
    static int log;
    public static void main(String [] args)
    {
        MyScanner sc = new MyScanner();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        int n = sc.nextInt();
        adj = new ArrayList [n + 1];

        log = (int)Math.ceil(Math.log(n) / Math.log(2));
        memo = new int[n + 1][log + 1];

        depth = new int[n + 1];

        for (int i = 0; i <= n; i++)
            Arrays.fill(memo[i], -1);
        for (int i = 0; i <= n; i++)
            adj[i] = new ArrayList<>();
        for (int i = 0; i < n - 1; i++) {
            int a = sc.nextInt(); int b = sc.nextInt();
            adj[a].add(b); adj[b].add(a);
        }
        dfs(1, 1);
        int q = sc.nextInt();
        for (int i = 0; i < q; i++) {
            int x = sc.nextInt(); int y = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int k = sc.nextInt();
            int lcaPath = lca(a, b); int lcaCycle = lca(x, y);
            int origLength = depth[a] + depth[b] - 2 * depth[lcaPath];
            int cycleLength = depth[x] + depth[y] - 2 * depth[lcaCycle] + 1;
            if (k >= origLength) {
                if (k % 2 == origLength % 2) {
                    out.println("YES");
                } else if (cycleLength % 2 == 0) {
                    out.println("NO");
                } else {
                    int dist1 = depth[a] + depth[x] - 2 * depth[lca(a, x)] + 1 + depth[b] + depth[y] - 2 * depth[lca(b, y)];
                    int dist2 = depth[a] + depth[y] - 2 * depth[lca(a, y)] + 1 + depth[b] + depth[x] - 2 * depth[lca(b, x)];
                    if (Math.min(dist1, dist2) <= k) out.println("YES"); else out.println("NO");
                }
            } else {
                if (cycleLength % 2 == 0 && k % 2 != origLength % 2) {
                    out.println("NO");
                } else {
                    int dist1 = depth[a] + depth[x] - 2 * depth[lca(a, x)] + 1 + depth[b] + depth[y] - 2 * depth[lca(b, y)];
                    int dist2 = depth[a] + depth[y] - 2 * depth[lca(a, y)] + 1 + depth[b] + depth[x] - 2 * depth[lca(b, x)];
                    if (Math.min(dist1, dist2) <= k && Math.min(dist1, dist2) % 2 == k % 2) out.println("YES"); else out.println("NO");
                }
            }

        }
        out.close();
    }

    static void dfs(int u, int p)
    {

        // Using recursion formula to calculate
        // the values of memo[][]
        memo[u][0] = p;
        for (int i = 1; i <= log; i++)
            memo[u][i] = memo[memo[u][i - 1]][i - 1];
        for (int v : adj[u]) {
            if (v != p) {

                // Calculating the level of each node
                depth[v] = depth[u] + 1;
                dfs(v, u);
            }
        }
    }

    static int lca(int u, int v)
    {
        // The node which is present farthest
        // from the root node is taken as u
        // If v is farther from root node
        // then swap the two
        if (depth[u] < depth[v]) {
            int temp = u;
            u = v;
            v = temp;
        }

        // Finding the ancestor of u
        // which is at same level as v
        for (int i = log; i >= 0; i--) {
            if ((depth[u] - (int)Math.pow(2, i)) >= depth[v])
                u = memo[u][i];
        }

        // If v is the ancestor of u
        // then v is the LCA of u and v
        if (u == v)
            return u;

        // Finding the node closest to the root which is
        // not the common ancestor of u and v i.e. a node
        // x such that x is not the common ancestor of u
        // and v but memo[x][0] is
        for (int i = log; i >= 0; i--) {
            if (memo[u][i] != memo[v][i]) {
                u = memo[u][i];
                v = memo[v][i];
            }
        }

        // Returning the first ancestor
        // of above found node
        return memo[u][0];
    }


    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }



    }

}