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.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class e620
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

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

    //  long start = System.currentTimeMillis();
//  long end = System.currentTimeMillis();
//  System.out.println((end - start) + "ms");

    static ArrayList<Integer>[] Tree;
    static int[] depth;
    static int[][] parent;
    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        int n = s.nextInt();
        Tree = new ArrayList[n+1];
        parent = new int[n+1][17];
        depth = new int[n+1];
        for(int i=0;i<=n;i++){
            Tree[i] = new ArrayList<>();
        }
        for(int i=0;i<n-1;i++){
            int u=s.nextInt();
            int v = s.nextInt();
            Tree[u].add(v);
            Tree[v].add(u);
        }
        //fill all parent with -1;
        for(int[] a:parent){
            Arrays.fill(a,-1);
        }
        depth[1] =0;
        dfs(0,1);
        computeSparsematrix(n);
        //we have processed sparse matrix and Lca and dist
        int q = s.nextInt();
        while((q--)>0){
            int x = s.nextInt();
            int y = s.nextInt();
            int a = s.nextInt();
            int b=  s.nextInt();
            int k = s.nextInt();
            //first find direct dist
            int dir_dist = dist(a,b);
            //next indirect dist using a-x and b-y
            int indir_x = dist(x,a)+1+dist(y,b);
            //next indirect dist using a-y and b-x
            int indir_y = dist(y,a)+1+dist(b,x);
            //now check whether k less than all three

//            System.out.println("dist "+dir_dist+" "+indir_x+" "+indir_y);

            if(k%2==(dir_dist%2) && k>=dir_dist){
                System.out.println("YES");
            }
            else if((k%2)==(indir_x%2)&& k>=indir_x){
                System.out.println("YES");
            }
            else if((k%2)==(indir_y%2) && k>=indir_y){
                System.out.println("YES");
            }
            else {
                System.out.println("NO");
            }
        }

    }

    public static void dfs(int prev,int curr){
        for(int child:Tree[curr]){
            if(child!=prev){
                parent[child][0] = curr;
                depth[child] = depth[curr]+1;
                dfs(curr,child);
            }
        }

    }
    public static void computeSparsematrix(int n){
        for(int i=1;i<17;i++){
            for(int node=1;node<=n;node++){
                if(parent[node][i-1]!=-1){
                    parent[node][i] = parent[parent[node][i-1]][i-1];
                }
            }
        }
    }

    public static int lca(int u,int v){
        if (depth[v] < depth[u])
        {
            u = u + v;
            v = u - v;
            u = u - v;
        }
        int diff = depth[v]-depth[u];
        //make levels equal
        for(int i=0;i<17;i++){
            if(((diff>>i)&1)==1){
                v = parent[v][i];
            }
        }
        if(u==v){
            return u;
        }
        for(int i=16;i>=0;i--){
            if(parent[u][i]!=parent[v][i]){
                u = parent[u][i];
                v = parent[v][i];
            }
        }
        return parent[u][0];
    }

    public static int dist(int u,int v){
        int lca = lca(u,v);
        int ans = depth[u]-depth[lca];
        ans+=depth[v]-depth[lca];
        return ans;
    }


    public static void print(String str,int val){
        System.out.println(str+"  "+val);
    }

    public static void print(Object[] obj){
        for(Object a:obj){
            System.out.println(a);
        }
    }

    public static void print(Object[][] obj){
        for(Object[] a:obj){
            System.out.println(a);
        }
    }

    public static void debug(long[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(int[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(arr[i]);
        }
    }

    public static void print(int[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(long[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }


//    OutputStream out = new BufferedOutputStream( System.out );
//        for(int i=1;i<n;i++){
//    out.write((max_divisor[i]+" ").getBytes());
//}
//        out.flush();



}
