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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Ribhav
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        E1TreesAndQueries solver = new E1TreesAndQueries();
        solver.solve(1, in, out);
        out.close();
    }

    static class E1TreesAndQueries {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int n = s.nextInt();
            int[] from = new int[n - 1], to = new int[n - 1];
            for (int i = 0; i < n - 1; i++) {
                from[i] = s.nextInt() - 1;
                to[i] = s.nextInt() - 1;
            }
            int[][] mat1 = func(n, from, to);

            int[][] upper = upper(mat1, 0);
            int[] par = upper[0], depth = upper[2];

            int[][] sparse = logstepParents(par);

            int q = s.nextInt();
            while (q-- > 0) {
                int x = s.nextInt() - 1, y = s.nextInt() - 1;
                int a = s.nextInt() - 1, b = s.nextInt() - 1;
                int k = s.nextInt();

                int lcaAB = lca(a, b, sparse, depth);
                int disAB = depth[a] + depth[b] - 2 * depth[lcaAB];

                if (k >= disAB && k % 2 == disAB % 2) {
                    out.println("YES");
                    continue;
                }

                int lcaXY = lca(x, y, sparse, depth);
                int disXY = depth[x] + depth[y] - 2 * depth[lcaXY];

                int lcaAX = lca(a, x, sparse, depth);
                int lcaAY = lca(a, y, sparse, depth);

                int lcaBX = lca(b, x, sparse, depth);
                int lcaBY = lca(b, y, sparse, depth);

                int dAX = depth[a] + depth[x] - 2 * depth[lcaAX];
                int dAY = depth[a] + depth[y] - 2 * depth[lcaAY];
                int dBX = depth[b] + depth[x] - 2 * depth[lcaBX];
                int dBY = depth[b] + depth[y] - 2 * depth[lcaBY];

                int dAB = Math.min(dAX + dBY, dAY + dBX) + 1;

                if (k >= dAB && k % 2 == dAB % 2) {
                    out.println("YES");
                    continue;
                } else {
                    out.println("NO");
                }
            }
        }

        int lca(int a, int b, int[][] sparse, int[] depth) {
            if (depth[a] < depth[b]) {
                b = ancestor(b, depth[b] - depth[a], sparse);
            } else if (depth[a] > depth[b]) {
                a = ancestor(a, depth[a] - depth[b], sparse);
            }
            if (a == b) {
                return a;
            }
            int sa = a, sb = b;
            for (int low = 0, high = depth[a], t = Integer.highestOneBit(high), k = Integer
                    .numberOfTrailingZeros(t); t > 0; t >>>= 1, k--) {
                if ((low ^ high) >= t) {
                    if (sparse[k][sa] != sparse[k][sb]) {
                        low |= t;
                        sa = sparse[k][sa];
                        sb = sparse[k][sb];
                    } else {
                        high = low | t - 1;
                    }
                }
            }
            return sparse[0][sa];
        }

        int ancestor(int u, int dep, int[][] sparse) {
            for (int i = 0; dep > 0 && u != -1; dep >>>= 1, i++) {
                if ((dep & 1) == 1)
                    u = sparse[i][u];
            }
            return u;
        }

        int[][] logstepParents(int[] parent) {
            int n = parent.length;
            int m = Integer.numberOfTrailingZeros(Integer.highestOneBit(n - 1)) + 1;
            int[][] sparse = new int[m][n];
            sparse[0] = parent;
            for (int j = 1; j < m; j++) {
                for (int i = 0; i < n; i++) {
                    sparse[j][i] = sparse[j - 1][i] == -1 ? -1 : sparse[j - 1][sparse[j - 1][i]];
                }
            }
            return sparse;
        }

        int[][] upper(int[][] g, int root) {
            int n = g.length;
            int[] par = new int[n];
            Arrays.fill(par, -1);

            int[] depth = new int[n];
            depth[0] = 0;

            int[] q = new int[n];
            q[0] = root;
            for (int p = 0, r = 1; p < r; p++) {
                int cur = q[p];
                for (int nex : g[cur]) {
                    if (par[cur] != nex) {
                        q[r++] = nex;
                        par[nex] = cur;
                        depth[nex] = depth[cur] + 1;
                    }
                }
            }
            return new int[][]{par, q, depth};
        }

        int[][] func(int n, int[] from, int[] to) {
            int[][] g = new int[n][];
            int[] p = new int[n];
            for (int f : from)
                p[f]++;
            for (int t : to)
                p[t]++;
            for (int i = 0; i < n; i++)
                g[i] = new int[p[i]];
            for (int i = 0; i < from.length; i++) {
                g[from[i]][--p[from[i]]] = to[i];
                g[to[i]][--p[to[i]]] = from[i];
            }
            return g;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

