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 SegTrees{
    static SegTree tree;
    static int lim=100050,n,a,b,x,y,k,q;
    static int[] eul=new int[lim*2],lvl=new int[lim*2],depth= new int[lim],index= new int[lim];
    static int epnt,lpnt;
    static ArrayList<Integer>[] adj= new ArrayList[lim];
    public static void eulDFS(int node,int parent,int d){
        index[node]=epnt;eul[epnt++]=node;lvl[lpnt++]=d;depth[node]=d;
        ArrayList<Integer> A=adj[node];
        for (int i = 0; i < A.size();i++) {
            if(A.get(i)!=parent){eulDFS(A.get(i), node, d+1);eul[epnt++]=node;lvl[lpnt++]=d;}
        }
    }
    public static int LCA(int p,int q){
        int A,B,P,Q;
        P=index[p];Q=index[q];
        if(P>Q){A=Q;B=P;}else{A=P;B=Q;}
        return eul[tree.RMQ(A,B)];
    }
    public static int dist(int A,int B){
        return depth[A]+depth[B]-2*depth[LCA(A,B)];
    }
         
    public static void main(String[] args) throws IOException{
        epnt=lpnt=0;
        Reader in = new Reader();
        n = in.nextInt();
        for (int i = 0; i <= n; i++) {
            adj[i]=new ArrayList<>();
        }
        for (int i = 0; i < n-1; i++) {
            a = in.nextInt();b = in.nextInt();
            adj[a].add(b);adj[b].add(a);
        }
        eulDFS(1, -1, 0);
        tree = new SegTree(lvl);
        int temp=tree.RMQ(0, 0);
        //tree.UPD(0, 4);
        //tree.UPD(0, temp);
        temp=tree.RMQ(2, 2);
        //tree.UPD(2, 5);
        //tree.UPD(2, temp);

        q=in.nextInt();
        int ab,ax,ay,bx,by;
        for (int i = 0; i < q; i++) {
            x = in.nextInt();y = in.nextInt();a = in.nextInt();b = in.nextInt();k=in.nextInt();
            ab=dist(a, b);ax=dist(a, x);ay=dist(a, y);bx=dist(b, x);by=dist(b, y);
            if(ab<=k && ab%2==k%2){System.out.println("YES");continue;}
            if((ax+1+by) <=k && (ax+1+by)%2==k%2){System.out.println("YES");continue;}
            if((bx+1+ay) <=k && (bx+1+ay)%2==k%2){System.out.println("YES");continue;}
            System.out.println("NO");
        }
    }
    static class Reader {
        final private int BUFFER_SIZE = 1 << 16; private DataInputStream din;
        private byte[] buffer; private int bufferPointer, bytesRead;
        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0;
       }
        private void fillBuffer() throws IOException{
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }
        private byte read() throws IOException {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }
        public void close() throws IOException {
            if (din == null) return;
            din.close();
        }
        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
        public int nextInt() throws IOException {
            int ret = 0; byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg)c = read();
            do{ ret = ret * 10 + c - '0'; }  while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }
        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9');
            if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } }
            if (neg) {return -ret; }else{return ret;}
        }
    } 
}

class SegTree{
    int[] arr,st; int S;
    public SegTree(int[] arr){
        this.arr=arr;this.S=arr.length;
        this.st= new int[(1<<((int)Math.ceil(Math.log(S) / Math.log(2))+1))];
        build(1, 0, S-1);
    }
    public static int left(int p){return (p<<1);}
    public static int right(int p){return (p<<1)|1;}
    public  void build(int p,int L,int R){
        if(L==R){st[p]=L;}else{
            build(left(p), L, (L+R)/2);build(right(p), (L+R)/2+1, R);
            int p1 = st[left(p)], p2 = st[right(p)]; 
            st[p] = (arr[p1] <= arr[p2]) ? p1 : p2; // Augment function
        }}
    public void upd(int p,int L,int R,int i){
        if(L==R){return;}else{
            if(i<=(L+R)/2){upd(left(p), L, (L+R)/2,i);}
            else{upd(right(p), (L+R)/2+1, R,i);}
            int p1 = st[left(p)], p2 = st[right(p)]; 
            st[p] = (arr[p1] <= arr[p2]) ? p1 : p2; // Augment function
        }}
    public void UPD(int i, int v){arr[i]=v;upd(1, 0, S-1, i);}
    public int rmq(int p,int L, int R,int i, int j){
        if (R < i || L > j) return -1;if (L >= i && R <= j) return st[p];
        int p1 = rmq(left(p) , L , (L+R)/2, i, j);
        int p2 = rmq(right(p), (L+R)/2+1, R , i, j);
        if(p1==-1){return p2;}if(p2==-1){return p1;}
        return (arr[p1] <= arr[p2]) ? p1 : p2; // Augment function
    }
    public int RMQ(int i,int j){return rmq(1,0,S-1,i,j);}// Index of ele
}


