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.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) {
        var scanner = new BufferedScanner();
        var writer = new PrintWriter(new BufferedOutputStream(System.out));

        var n = scanner.nextInt();
        var tree = new Tree(n);
        for (int i = 0; i < n - 1; i++) {
            var u = scanner.nextInt();
            var v = scanner.nextInt();
            tree.edge(u, v);
        }
        tree.preLca();
        tree.dfs(1);
        var q = scanner.nextInt();
        for (int i = 0; i < q; i++) {
            var x = scanner.nextInt();
            var y = scanner.nextInt();
            var a = scanner.nextInt();
            var b = scanner.nextInt();
            var k = scanner.nextInt();
            if (query(x, y, a, b, k, tree)) {
                writer.println("YES");
            } else {
                writer.println("NO");
            }
        }

        scanner.close();
        writer.flush();
        writer.close();
    }

    private static boolean query(int x, int y, int a, int b, int k, Tree tree) {
        var d1 = tree.dist(a, b);
        if (d1 <= k && (d1 - k) % 2 == 0) {
            return true;
        }
        var d2 = tree.dist(a, x) + 1 + tree.dist(y, b);
        if (d2 <= k && (d2 - k) % 2 == 0) {
            return true;
        }
        var d3 = tree.dist(a, y) + 1 + tree.dist(x, b);
        if (d3 <= k && (d3 - k) % 2 == 0) {
            return true;
        }
        return false;
    }

    static class IntList extends ArrayList<Integer> {}

    static class Tree {
        final int n;
        final IntList[] edges;
        final int[] depth;
        int[][] anc;

        Tree(int n) {
            this.n = n;
            this.edges = new IntList[n + 1];
            for (var i = 1; i <= n; i++) {
                edges[i] = new IntList();
            }
            depth = new int[n + 1];
        }

        void edge(int a, int b) {
            edges[a].add(b);
            edges[b].add(a);
        }

        List<Integer> edge(int a) {
            return edges[a];
        }

        void preLca() {
            var exp = (int) (Math.log(n) / Math.log(2) + 1);
            assert (1 << exp) >= n;
            anc = new int[exp][n + 1];
        }

        void dfs(int root) {
            dfs(root, root);
        }

        void dfs(int parent, int node) {
            for (var child : edges[node]) {
                if (parent != child) {
                    calcAnc(node, child);
                    depth[child] = depth[node] + 1;
                    dfs(node, child);
                }
            }
        }

        int dist(int a, int b) {
            var m = lca(a, b);
            return depth[a] - depth[m] + depth[b] - depth[m];
        }

        int lca(int a, int b) {
            if (depth[a] < depth[b]) {
                return lca(b, a);
            }
            a = la(a, depth[a] - depth[b]);
            if (a == b) {
                return a;
            }
            for (var i = anc.length - 1; i >= 0; i--) {
                if (anc[i][a] != anc[i][b]) {
                    a = anc[i][a];
                    b = anc[i][b];
                }
            }
            return anc[0][a];
        }

        private int la(int node, int dist) {
            for (var i = anc.length - 1; i >= 0; i--) {
                if ((dist & (1 << i)) > 0) {
                    node = anc[i][node];
                }
            }
            return node;
        }

        private void calcAnc(int node, int child) {
            if (anc == null) {
                return;
            }
            anc[0][child] = node;
            for (var i = 1; i < anc.length; i++) {
                anc[i][child] = anc[i - 1][anc[i - 1][child]];
            }
        }
    }

    public static class BufferedScanner {
        BufferedReader br;
        StringTokenizer st;

        public BufferedScanner(Reader reader) {
            br = new BufferedReader(reader);
        }

        public BufferedScanner() {
            this(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;
        }

        void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }

    static long gcd(long a, long b) {
        if (a < b) {
            return gcd(b, a);
        }
        while (b > 0) {
            long tmp = b;
            b = a % b;
            a = tmp;
        }
        return a;
    }

    static long inverse(long a, long m) {
        long[] ans = extgcd(a, m);
        return ans[0] == 1 ? (ans[1] + m) % m : -1;
    }

    private static long[] extgcd(long a, long m) {
        if (m == 0) {
            return new long[]{a, 1, 0};
        } else {
            long[] ans = extgcd(m, a % m);
            long tmp = ans[1];
            ans[1] = ans[2];
            ans[2] = tmp;
            ans[2] -= ans[1] * (a / m);
            return ans;
        }
    }

    private static List<Integer> primes(double upperBound) {
        var limit = (int) Math.sqrt(upperBound);
        var isComposite = new boolean[limit + 1];
        var primes = new ArrayList<Integer>();
        for (int i = 2; i <= limit; i++) {
            if (isComposite[i]) {
                continue;
            }
            primes.add(i);
            int j = i + i;
            while (j <= limit) {
                isComposite[j] = true;
                j += i;
            }
        }
        return primes;
    }


}
