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.io.PrintStream;
import java.util.Arrays;
import java.lang.reflect.Array;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

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

    static class E1TreesAndQueries {
        public static ArrayList<Integer>[] g;
        ArrayList<Integer> et;
        ArrayList<Integer> level;
        int[] dis;

        public void dfs(int root, int parent, int level) {
            et.add(root);
            this.level.add(level);
            dis[root] = level;
            for (int x : g[root]) {
                if (x != parent) {
                    dfs(x, root, level + 1);
                    et.add(root);
                    this.level.add(level);
                }
            }
            return;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            dis = new int[n];
            g = new ArrayList[n];
            et = new ArrayList<>();
            level = new ArrayList<Integer>();
            for (int i = 0; i < n; i++) g[i] = new ArrayList<Integer>();
            for (int i = 0; i < n - 1; i++) {
                int a = in.nextInt() - 1;
                int b = in.nextInt() - 1;
                g[a].add(b);
                g[b].add(a);
            }
            int eulermap[] = new int[n];
            Arrays.fill(eulermap, -1);
            dfs(0, -1, 0);
            for (int i = 0; i < et.size(); i++) {
                if (eulermap[et.get(i)] == -1) {
                    eulermap[et.get(i)] = i;
                }
            }
            node ll[] = new node[level.size()];
            for (int i = 0; i < level.size(); i++) {
                ll[i] = new node(level.get(i), i);
            }
            node nu = new node(Integer.MAX_VALUE, -1);
            SegmentTree<node> st = new SegmentTree<node>(ll, node.class, nu);
            int q = in.nextInt();

            while (q-- > 0) {
                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 abd = dis[a] + dis[b] - 2 * dis[et.get(st.get(eulermap[a], eulermap[b]).y)];
                int axd = dis[a] + dis[x] - 2 * dis[et.get(st.get(eulermap[a], eulermap[x]).y)];
                int ayd = dis[a] + dis[y] - 2 * dis[et.get(st.get(eulermap[a], eulermap[y]).y)];
                int bxd = dis[b] + dis[x] - 2 * dis[et.get(st.get(eulermap[b], eulermap[x]).y)];
                int byd = dis[b] + dis[y] - 2 * dis[et.get(st.get(eulermap[b], eulermap[y]).y)];
                if (k - abd >= 0 && (k - abd) % 2 == 0) {
                    out.println("YES");
                } else if (k - axd - byd - 1 >= 0 && (k - axd - byd - 1) % 2 == 0) {
                    out.println("YES");
                } else if (k - ayd - bxd - 1 >= 0 && (k - ayd - bxd - 1) % 2 == 0) {
                    out.println("YES");
                } else {
                    out.println("NO");
                }
            }

        }

    }

    static class SegmentTree<T extends node> {
        T[] st;
        T nu;
        int n;

        SegmentTree(T arr[], Class<T> c, T nu) {
            n = arr.length;
            int x = (int) (Math.ceil(Math.log(n) / Math.log(2)));
            this.nu = nu;
            int max_size = 2 * (int) Math.pow(2, x) - 1;
            st = (T[]) Array.newInstance(c, max_size); // Memory allocation
            constructSTUtil(arr, 0, n - 1, 0);
        }

        T value(T x, T y) {
            if (x.x < y.x) {
                return x;
            } else {
                return y;
            }
        }

        int getMid(int s, int e) {
            return s + (e - s) / 2;
        }

        T get(int qs, int qe) {
            int a = Math.min(qs, qe);
            int b = Math.max(qs, qe);
            qs = a;
            qe = b;
            if (qs < 0 || qe > n - 1 || qs > qe) {
                System.out.println("Invalid Input");
                return nu;
            }
            return getUtil(0, n - 1, qs, qe, 0);
        }

        T getUtil(int ss, int se, int qs, int qe, int si) {
            // If segment of this node is a part of given range, then return
            // the sum of the segment
            if (qs <= ss && qe >= se) {
                return st[si];

            }

            // If segment of this node is outside the given range
            if (se < qs || ss > qe)
                return nu;
            // If a part of this segment overlaps with the given range
            int mid = getMid(ss, se);
            return value(getUtil(ss, mid, qs, qe, 2 * si + 1), getUtil(mid + 1, se, qs, qe, 2 * si + 2));

        }

        T constructSTUtil(T arr[], int ss, int se, int si) {
            // If there is one element in array, store it in current node of
            // segment tree and return
            if (ss == se) {
                st[si] = arr[ss];
                return arr[ss];
            }
            int mid = getMid(ss, se);
            st[si] = value(constructSTUtil(arr, mid + 1, se, si * 2 + 2), constructSTUtil(arr, ss, mid, si * 2 + 1));
            return st[si];
        }

    }

    static class node {
        int x;
        int y;

        node(int x, int y) {
            this.x = x;
            this.y = y;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}

