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.*;
import java.util.*;


public class tree1 {


    public static void main(String[] args) throws Exception {
        R in = new R();
        int vertices = in.nextInt();
        ArrayList<ArrayList<Integer>> connections = new ArrayList<>();
        for (int i = 0; i < vertices; i++) {
            connections.add(new ArrayList<>());
        }
        for (int i = 0; i < vertices - 1; i++) {
            int u = in.nextInt()-1;
            int v = in.nextInt()-1;
            connections.get(u).add(v);
            connections.get(v).add(u);
        }
        // bfs first

        int[] levels = new int[vertices];
        int[] parent = new int[vertices];

        getLevelsAndParent(levels,parent,connections);

        int[][] ancestorData = logAncestor(parent, levels, vertices);

        int q = in.nextInt();
        StringBuilder print = new StringBuilder();

        for (int i = 0; i < q; i++) {
            int x = in.nextInt()-1;
            int y = in.nextInt()-1;
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            int k = in.nextInt();

            int distOriginal = distLCA(a,b,ancestorData,levels);
            int distWithPath = Math.min(
                distLCA(a,x,ancestorData,levels) + 1 + distLCA(y,b,ancestorData,levels),
                distLCA(a,y,ancestorData,levels) + 1 + distLCA(x,b,ancestorData,levels)
            );
            if ((distOriginal%2 == k%2 && distOriginal <= k)
                || distWithPath%2 == k%2 && distWithPath <= k) {
                print.append("YES");
            } else {
                print.append("NO");
            }
            print.append('\n');
        }
        System.out.print(print);
        System.out.flush();
    }

        /*
        boolean[] parity = new boolean[vertices]; // false=0, true=1

        HashSet<Integer> pastNodes = new HashSet<>();
        HashSet<Integer> nodes = new HashSet<>();
        nodes.add(0);

        // already false


        boolean currentParity = false;
        while (!nodes.isEmpty()) {
            HashSet<Integer> futureNodes = new HashSet<>();
            for (int x : nodes) {
                parity[x]=currentParity;
                futureNodes.addAll(connections.get(x));
            }
            futureNodes.removeAll(pastNodes);

            currentParity = !currentParity;
            pastNodes=nodes;
            nodes=futureNodes;
        }*/

    public static void getLevelsAndParent(int[] levels, int[] parent, ArrayList<ArrayList<Integer>> connections) {
        HashSet<Integer> nodes = new HashSet<>();
        nodes.add(0);

        for (int currentLevel = 0; !nodes.isEmpty(); currentLevel++) {
            HashSet<Integer> futureNodes = new HashSet<>();
            for (int x : nodes) {
                levels[x]=currentLevel;
                for (int node : connections.get(x)) {
                    if (node != parent[x]) {
                        futureNodes.add(node);
                        parent[node]=x;
                    }
                }
            }
            nodes=futureNodes;
        }
    }




    /**
     * See Lib.java
     */
    public static int floor_log2(int x) {
        int result = -1;
        for (;x != 0; x>>=1) result++;
        return result; // floor_log2(0) = -1
    }

    /**
     * LCA Algorithm
     * https://www.topcoder.com/community/competitive-programming/tutorials/range-minimum-query-and-lowest-common-ancestor/
     */
    public static int[][] logAncestor(int[] parent, int[] level, int vertices) {
        int[][] ancestors = new int[vertices][];
        for (int i = 0; i < vertices; i++) {
            ancestors[i] = new int[floor_log2(level[i]) + 1];
            if (ancestors[i].length != 0) ancestors[i][0]=parent[i];
            for (int j = 1; j < ancestors[i].length; j++) {
                ancestors[i][j]=-1;
            }
        }

        for (int j = 1; (1 << j) < vertices; j++) {
            for (int i = 0; i < vertices; i++) {
                if (j < ancestors[i].length && ancestors[i][j-1] != -1) {
                    ancestors[i][j] = ancestors[ancestors[i][j-1]][j-1];
                }
            }
        }
        return ancestors;
    }


    public static int distLCA(int p, int q, int[][] logAncestor, int[] level) {
        int tmp;
        if (level[p] < level[q]) {
            tmp=p;
            p=q;
            q=tmp;
        }
        int result = 0;

        int log = floor_log2(level[p]);
        for (int i = log; i >= 0; i--) {
            if (level[p] - (1<<i) >= level[q]) {
                p = logAncestor[p][i];
                result += 1<<i;
            }
        }
        if (p==q) {
            return result;
        }

        for (int i = log; i >= 0; i--) {
            if (i < logAncestor[p].length && logAncestor[p][i] != logAncestor[q][i]) {
                p = logAncestor[p][i];
                q = logAncestor[q][i];
                result += 2<<i;
            }
        }
        return result + 2; // have same parent
    }

    //<editor-fold desc="R">

    /**
     * This class is for fast input. Please ignore.
     */
    public static class R {
        private BufferedReader br;
        /**
         * Should be set to null at end of line
         */
        private StringTokenizer st;

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

        public R(String filename) throws IOException {
            br = new BufferedReader(new FileReader(filename + ".in"));
        }

        public R(BufferedReader reader) {
            br = reader;
        }

        public BufferedReader getReader() {
            return br;
        }

        public StringTokenizer getStringTokenizer() {
            return st;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

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

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

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

        /**
         * Note:
         * CAN MODIFY the BufferedReader's location and the string tokenizer!!!
         * Recommended to only use with next().
         */
        public boolean lineHasNext() throws IOException {
            if (st == null) {
                String s = br.readLine();
                if (s == null) return false;
                st = new StringTokenizer(s);
            }
            return st.hasMoreTokens();
        }

        /**
         * Note:
         * CAN MODIFY the BufferedReader's location and the string tokenizer!!!
         * Recommended to only use with next().
         */
        public boolean hasNext() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        /**
         * Skips a line. Sets st to null if has tokens left, and otherwise
         * reads a line.
         */
        public void skipLine() throws IOException {
            if (st == null || !st.hasMoreTokens()) {
                br.readLine(); // Otherwise, would do nothing.
            }
            st = null;
        }

        /**
         * This will set st to null, and this ignores current line
         */
        public String[] nextLine() throws IOException {
            String s = br.readLine();
            if (s == null) return null;
            st = new StringTokenizer(s);
            ArrayList<String> result = new ArrayList<>();
            while (st.hasMoreTokens()) {
                result.add(st.nextToken());
            }
            st = null;
            return result.toArray(new String[0]);
        }

        /**
         * sets st to null!
         */
        public String[] nextTower(int lines) throws IOException {
            String[] tower = new String[lines];
            st = null;
            for (int i = 0; i < lines; i++) {
                tower[i] = br.readLine();
            }
            return tower;
        }

        public int[] nextIntLine() throws IOException {
            return intArr(nextLine());
        }

        public long[] nextLongLine() throws IOException {
            return longArr(nextLine());
        }

        public int[] nextIntTower(int lines) throws IOException {
            return intArr(nextTower(lines));
        }

        public long[] nextLongTower(int lines) throws IOException {
            return longArr(nextTower(lines));
        }

        public int[] intArr(String[] strings) throws IOException {
            int[] ints = new int[strings.length];
            int i = 0;
            for (String s : strings) {
                ints[i] = Integer.parseInt(s);
                i++;
            }
            return ints;
        }

        public long[] longArr(String[] strings) throws IOException {
            long[] longs = new long[strings.length];
            int i = 0;
            for (String s : strings) {
                longs[i] = Long.parseLong(s);
                i++;
            }
            return longs;
        }

        public double[] doubleArr(String[] strings) {
            double[] doubles = new double[strings.length];
            int i = 0;
            for (String s : strings) {
                doubles[i] = Double.parseDouble(s);
                i++;
            }
            return doubles;
        }

        /**
         * This will set st to null
         */
        public char[] nextCharArray() throws IOException {
            st = null;
            String s = br.readLine();
            return s == null ? null : s.toCharArray();
        }

        /**
         * This will set st to null
         * Boolean at pos i true if char at pos i == c
         */
        public boolean[] nextBoolArray(char c) throws IOException {
            char[] chars = nextCharArray();
            if (chars == null) return null;
            boolean[] booleans = new boolean[chars.length];
            for (int i = 0; i < chars.length; i++) {
                booleans[i] = chars[i] == c;
            }
            return booleans;
        }

        public int[][] next2Dint(int lines) throws IOException {
            int[][] result = new int[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextIntLine();
            }
            return result;
        }

        public long[][] next2Dlong(int lines) throws IOException {
            long[][] result = new long[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextLongLine();
            }
            return result;
        }

        public char[][] next2Dchar(int lines) throws IOException {
            char[][] result = new char[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextCharArray();
            }
            return result;
        }

        public boolean[][] next2Dbool(int lines, char c) throws IOException {
            boolean[][] result = new boolean[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextBoolArray(c);
            }
            return result;
        }
    }
    //</editor-fold>
}