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.io.*;
public class lp{ 
static PrintWriter out = new PrintWriter(System.out);
static int index=0;
static void DFS(LinkedList<Integer> adjList[],int s,int level[],int FAI[],int Euler[],boolean visited[]){
                    visited[s]=true;

                    Euler[index++]=s;
                    FAI[s]=index-1;
                  for(Integer I : adjList[s])
                       if(visited[I]==false){
                              level[I]=level[s]+1;
                              DFS(adjList,I,level,FAI,Euler,visited);
                               Euler[index++]=s;
                       }   
        }
static void FillSparse(int ST[][],int Euler[],int level[],int n,int k){

                         for (int i = 0; i <n; i++)
                                 ST[i][0] = Euler[i];
                            for (int j = 1; j <k; j++)
                               for (int i = 0; (i+(1 << j))<=n; i++){
                                      int l =  Math.min(level[ST[i][j-1]], level[ST[i + (1 << (j - 1))][j - 1]]);
                                       if(l==level[ST[i][j-1]])
                                          ST[i][j] = ST[i][j-1];
                                       else
                                          ST[i][j] = ST[i + (1 << (j - 1))][j - 1];
                               }
}
static int queryLca(int ST[][],int level[],int FAI[],int log[],int v1,int v2){ // function to find lca of 2 nodes

              int l = Math.min(FAI[v1],FAI[v2]);
              int r = Math.max(FAI[v1],FAI[v2]);
              int j=log[r-l+1];
              int ans =-1;
                   int min = Math.min(level[ST[l][j]],level[ST[r-(1<<j)+1][j]]);
                     if(min==level[ST[l][j]])
                          ans = ST[l][j];
                     else 
                         ans = ST[r-(1<<j)+1][j]; 
                 return(ans);
           }
static int distance(int ST[][],int level[],int FAI[],int log[],int v1,int v2){ // function to find distance between 2 nodes

                      int lca = queryLca(ST,level, FAI,log,v1,v2);
                      int ans = level[v1]+level[v2]-2*level[lca];
                        return(ans);
               }
public static void main(String[] args){
   
     int n = sc.nextInt();
     LinkedList<Integer> adjList[] = new LinkedList[n+1];
      for(int i=0;i<=n;i++)
            adjList[i] = new LinkedList();
     
      for(int i=1;i<n;i++){
            int u = sc.nextInt()-1;
            int v = sc.nextInt()-1;
            adjList[u].add(v);
            adjList[v].add(u);
       }
     int level[] = new int[n+1];
     int FAI[] = new int[n+1];  
     int Euler[] = new int[4*n];
     boolean visited[] = new boolean[n+1];
           DFS(adjList,1,level,FAI,Euler,visited);

     int k = (int)(Math.log(index)/Math.log(2))+1;
     int ST[][] = new int[index][k];
     int Log[] = new int[index+1];
        FillSparse(ST,Euler ,level, index,k);
         
            Log[1] = 0;
          for (int i = 2; i <=index; i++)
              Log[i] = Log[i/2]+1; 
     int q = ni();
      for(int o=1;o<=q;o++){
           int x = ni()-1;
           int y = ni()-1;
           int a = ni()-1;
           int b = ni()-1;
           int K = ni();
           int d1 = distance(ST,level,FAI,Log,a,b);
           int d2 = distance(ST,level,FAI,Log,a,x)+1+distance(ST,level,FAI,Log,y,b);
           int d3 = distance(ST,level,FAI,Log,a,y)+1+distance(ST,level,FAI,Log,x,b);
           if((d1<=K&&d1%2==K%2)||(d2<=K&&d2%2==K%2)||(d3<=K&&d3%2==K%2))
               out.println("YES");
           else
               out.println("NO");
      } 
                out.flush();
}
static boolean pal(String s)
{
   int n = s.length(),i1=0,i2=n-1;

     while(i1<i2)
     {
        if(s.charAt(i1)!=s.charAt(i2))
             return false;
             i1++; i2--;
     }
       return true;
}
static String rev(String r)
{
    String s = "";
    int i= r.length()-1;

    while(i>=0)
    {
        s=s+r.charAt(i);
        i--;   
    }
       return s;
}
static FastReader sc=new FastReader(); 
 
      static int ni(){
                 int x = sc.nextInt();
                 return(x);
        }
      static long nl(){
              long x = sc.nextLong();
              return(x);
         }
      static String n(){
                 String str = sc.next();
                     return(str);
       }
     static String ns(){
                 String str = sc.nextLine();
                   return(str);
      }
     static double nd(){
               double d = sc.nextDouble();
                 return(d);
       }
  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; 
        } 
    } 
}