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.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Main{
    public int lca(int[][] dp,int[] level,int u,int v,int maxlog) {
        if(level[u]<level[v]) {
            return this.lca(dp, level, v, u,maxlog);
        }
        int diff=level[u]-level[v];
        for(int i=maxlog-1;i>=0;i--) {
            if(diff>=Math.pow(2, i)) {
                u=dp[u][i];
                diff-=Math.pow(2, i);
            }
        }
        if(u==v) {
            return u;
        }
        for(int i=maxlog-1;i>=0;i--) {
            if(dp[u][i]!=-1 && dp[v][i]!=-1 && dp[u][i]!=dp[v][i]) {
                u=dp[u][i];
                v=dp[v][i];
            }
        }
        return dp[u][0];
    }
    public void dfs(ArrayList<Integer>[] graph,int[] visited,int source,int[] parent ,int[] levels,int level) {
        visited[source]=1;
        levels[source]=level;
        for(int i:graph[source]) {
            if(visited[i]==0) {
                parent[i]=source;
                this.dfs(graph, visited, i, parent, levels, level+1);
            }
        }
    }
    public int dist(int a,int b,int[][] dp,int[] level,int maxlog) {
        int lca=this.lca(dp, level, a, b, maxlog);
        return (level[a]+level[b]-2*level[lca]);
    }
    public static void main(String[] args) throws Exception{
        Reader.init(System.in);
        PrintWriter out=new PrintWriter(System.out);
        int n=Reader.nextInt();
        ArrayList<Integer>[] tree=new ArrayList[n];
        for(int i=0;i<n;i++) {
            tree[i]=new ArrayList<Integer>();
        }
        for(int i=0;i<n-1;i++) {
            int a=Reader.nextInt()-1;
            int b=Reader.nextInt()-1;
            tree[a].add(b);
            tree[b].add(a);
        }
        int[] parent=new int[n];
        int[] level=new int[n];
        Arrays.fill(parent, -1);
        Main mm=new Main();
        mm.dfs(tree, new int[n], 0, parent, level, 0);
        int maxlog=(int)Math.log(n)*2;
        int[][] dp=new int[n][maxlog];
        for(int i=0;i<maxlog;i++) {
            for(int j=0;j<n;j++) {
                if(i==0) {
                    dp[j][i]=parent[j];
                }
                else {
                    if(dp[j][i-1]!=-1) {
                        dp[j][i]=dp[dp[j][i-1]][i-1];
                    }
                }
            }
        }
//      System.out.println(mm.lca(dp, level, 0, 1, maxlog));
//      System.out.println(mm.lca(dp, level, 1, 2, maxlog));
//      System.out.println(mm.lca(dp, level, 2, 3, maxlog));
//      System.out.println(mm.lca(dp, level, 3, 4, maxlog));
//      System.out.println(level[0]+" "+level[1]+" "+level[mm.lca(dp, level, 0, 1, maxlog)]);
        int q=Reader.nextInt();
        while(q>0) {
            q--;
            int x=Reader.nextInt()-1;
            int y=Reader.nextInt()-1;
            int a=Reader.nextInt()-1;
            int b=Reader.nextInt()-1;
            int k=Reader.nextInt();
            int ab=mm.dist(a, b, dp, level, maxlog);
            int xy=1;
            int ax=mm.dist(x, a, dp, level, maxlog);
            int ay=mm.dist(a, y, dp, level, maxlog);
            int bx=mm.dist(b, x, dp, level, maxlog);
            int by=mm.dist(b, y, dp, level, maxlog);
//          System.out.println(a+" "+b+" "+x+" "+y);
//          System.out.println(ab+" "+xy+" "+ax+" "+ay+" "+bx+" "+by);
            int equal=k%2;
            if((ab%2==equal && ab<=k) || ((ax+xy+by)%2==equal && (ax+xy+by)<=k ) || ((ay+xy+bx)%2==equal && (ay+xy+bx)<=k) ) {
                out.println("YES");
            }
            else {
                out.println("NO");
            }
        }
        out.close();
        
    }
}
class pair{
    int v1;
    int v2;
    pair(int v1,int v2){
        this.v1=v1;
        this.v2=v2;
    }
}
class a implements Comparator<pair>{
    public int compare(pair p1,pair p2 ) {
        return p1.v1-p2.v1;
    }
}
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
//    / call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
   
    static String nextLine() throws IOException{
        return reader.readLine();
    }
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}