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.*;
import java.lang.*;
import java.math.*;
public class Main extends Thread  {
    boolean[] prime;
    FastScanner sc;
    PrintWriter pw;
    long startTime = System.currentTimeMillis();
    final class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
 
        public long nlo() {
            return Long.parseLong(next());
        }
 
        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return st.nextToken();
        }
 
        public int ni() {
            return Integer.parseInt(next());
        }
 
        public String nli() {
            String line = "";
            if (st.hasMoreTokens()) line = st.nextToken();
            else try {
                return br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            while (st.hasMoreTokens()) line += " " + st.nextToken();
            return line;
        }
 
        public double nd() {
            return Double.parseDouble(next());
        }
    }
    public Main(ThreadGroup t,Runnable r,String s,long d )
    {
        super(t,r,s,d);
    }
    public void run()
    {
        sc=new FastScanner();
        pw=new PrintWriter(System.out);
        solve();
        pw.flush();
        pw.close();
    }
    public static void main(String[] args)
    {
        new Main(null,null,"",1<<26).start();
    }
 
 
    /////////////------------------------------------//////////////
    ////////////------------------Main-Logic--------//////////////
    ///////////-------------------------------------//////////////
    public static int[][] stmp;
    public static int[] hgt;
    public static int[][] prr;
    public static int[] visit;
    public static int timer;
    public static HashSet<Integer>[] adj;
    public void solve() {
       int n=sc.ni();
       hgt=new int[n];
        stmp=new int[n][2];
        adj=new HashSet[n];
        visit=new int[n];
        timer=1;
        for(int i=0;i<n;i++)
        adj[i]=new HashSet();
        prr=new int[n][32];
        for(int i=0;i<n-1;i++)
        {
            int x=sc.ni()-1;
            int y=sc.ni()-1;
            adj[x].add(y);
            adj[y].add(x);
        }
        dfs(0,-1,0);
        int m=sc.ni();
        while(m-->0)
        {
            int res=-1;
            int x=sc.ni()-1;
            int y=sc.ni()-1;
            int a=sc.ni()-1;
            int b=sc.ni()-1;
            int k=sc.ni();
            if(x==y&&x==a&&x==b)
            res=0;
            int p=lca(a,b);
            //pw.println(p+" "+a+" "+b);
            int z=k-(Math.abs(hgt[a]-hgt[p])+Math.abs(hgt[b]-hgt[p]));
            if((z>=0)&&(z%2==0))
            res=0;
            p=lca(b,x);
            //pw.println(p+" "+x+" "+b);
            int q=lca(a,y);
            //pw.println(q+" "+a+" "+y);
            z=k-(hgt[b]-2*hgt[p]+hgt[x]+1+hgt[a]-2*hgt[q]+hgt[y]);
            if((z>=0)&&(z%2==0))
            res=0;
            p=lca(a,x);
            //pw.println(p+" "+a+" "+x);
            q=lca(b,y);
            //pw.println(q+" "+b+" "+y);
            z=k-(hgt[b]-2*hgt[p]+hgt[x]+1+hgt[a]-2*hgt[q]+hgt[y]);
            if((z>=0)&&(z%2==0))
            res=0;
            if(res==0)
            pw.println("YES");
            else
            pw.println("NO");
        }
    }
     public static void dfs(int x,int z,int h)
    {
        visit[x]=1;
        hgt[x]=h;
        stmp[x][0]=timer++;
        prr[x][0]=z;
        for(int i=1;i<32;i++)
        {
            if(prr[x][i-1]==-1)
            prr[x][i]=-1;
            else
            prr[x][i]=prr[prr[x][i-1]][i-1];
        }
        for(int y:adj[x])
        {
            if(visit[y]==0)
            dfs(y,x,h+1);
        }
        stmp[x][1]=timer++;
    }
    public static int lca(int x,int y)
    {
        if(x==y)
        return x;
        if(is(x,y))
        return x;
        if(is(y,x))
        return y;
        for(int i=31;i>=0;i--)
        {
            if(prr[x][i]==-1)
            continue;
            if(!is(prr[x][i],y))
            x=prr[x][i];
        }
        return prr[x][0];
    }
    public static boolean is(int x,int y)
    {
        if((stmp[x][0]<stmp[y][0])&&(stmp[x][1]>stmp[y][1]))
        return true;
        else
        return false;
    }
}











