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 
from types import GeneratorType
def bootstrap(f, stack=[]):
    def wrappedfunc(*args, **kwargs):
        if stack:
            return f(*args, **kwargs)
        else:
            to = f(*args, **kwargs)
            while True:
                if type(to) is GeneratorType:
                    stack.append(to)
                    to = next(to)
                else:
                    stack.pop()
                    if not stack:
                        break
                    to = stack[-1].send(to)
            return to
    return wrappedfunc

def main():
    
    n=int(input())
    adj=[[] for _ in range(n+1)]
    for _ in range(n-1):
        u,v=readIntArr()
        adj[u].append(v)
        adj[v].append(u)
    
    
    # Note: For this question, root the tree at 1
    
    '''BINARY LIFTING LCA - Preprocess O(nlogn), find dist or LCA between 2 vertices in O(logn)'''
    @bootstrap
    def dfsPopulateAncestor(node,d): # NEEDS BOOTSTRAP
        m=len(path)
        b=1
        while m-b>=0:
            nodeAncestors[node].append(path[m-b])
            b*=2
        nodeDepths[node]=d
        path.append(node)
        for nex in adj[node]:
            if len(path)>=2 and nex==path[-2]: continue #parent
            yield dfsPopulateAncestor(nex,d+1)
        path.pop()
        yield None
    ## Needs adj as a global variable. adj[u]=[v1,v2, ... where there is an edge u-v]
    nodeDepths=[None for _ in range(n+1)]
    nodeAncestors=[[] for _ in range(n+1)] #[1 up, 2 up, 4 up, ...]
    root=1 ## To modify accordingly
    path=[]
    dfsPopulateAncestor(root,0)
    # print(nodeAncestors)
    @bootstrap
    def dfsEulerTour(node,p): #NEEDS BOOTSTRAP
        startTimes[node]=time[0]
        time[0]+=1
        for nex in adj[node]:
            if nex==p: continue #parent
            yield dfsEulerTour(nex,node)
        endTimes[node]=time[0]
        time[0]+=1
        yield None
    startTimes=[0 for _ in range(n+1)]
    endTimes=[0 for _ in range(n+1)]
    time=[0]
    dfsEulerTour(root,-1)
    def isAncestor(node,ancestorCandidate):
        ac=ancestorCandidate
        return startTimes[ac]<=startTimes[node] and endTimes[ac]>=endTimes[node]
    
    def getLCA(u,v):
        if isAncestor(u,v):
            return v
        elif isAncestor(v,u):
            return u
        else:
            # Find LCA
            ancestor=u
            while True:
                ancs=nodeAncestors[ancestor]
                m=len(ancs)
                assert m>0 # should not reach the root
                if isAncestor(v,ancs[0]): # found LCA
                    LCA=ancs[0]
                    break
                broken=False
                for i in range(m): # binary search up u's ancestor to find highest non-ancestor
                    if isAncestor(v,ancs[i]):
                        ancestor=ancs[i-1]
                        broken=True
                        break
                if broken==False:
                    ancestor=ancs[-1]
            return LCA
    
    def getDist(u,v):
        LCA=getLCA(u,v)
        return nodeDepths[u]+nodeDepths[v]-2*nodeDepths[LCA]
    
    q=int(input())
    allans=[]
    for _ in range(q):
        x,y,a,b,k=readIntArr()
        ans='NO'
        
        # Don't use the new path
        temp=k-getDist(a,b)
        if temp>=0 and temp%2==0:
            ans='YES'
        
        # Use the new path
        xy=getDist(x,y)
        # a-x-y-b, no cycle
        temp=k-(getDist(a,x)+getDist(b,y)+1)
        if temp>=0 and temp%2==0:
            ans='YES'
        # a-x-y-b, use 1 cycle
        temp=temp-(1+xy)
        if temp>=0 and temp%2==0:
            ans='YES'
        #a-y-x-b, no cycle
        temp=k-(getDist(a,y)+getDist(b,x)+1)
        if temp>=0 and temp%2==0:
            ans='YES'
        #a-y-x-b, use 1 cycle
        temp=temp-(1+xy)
        if temp>=0 and temp%2==0:
            ans='YES'
        
        allans.append(ans)
        
    multiLineArrayPrint(allans)
    
    return
    
import sys
input=sys.stdin.buffer.readline #FOR READING PURE INTEGER INPUTS (space separation ok)
# import sys
# input=lambda: sys.stdin.readline().rstrip("\r\n") #FOR READING STRING/TEXT INPUTS.
 
def oneLineArrayPrint(arr):
    print(' '.join([str(x) for x in arr]))
def multiLineArrayPrint(arr):
    print('\n'.join([str(x) for x in arr]))
def multiLineArrayOfArraysPrint(arr):
    print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))
 
def readIntArr():
    return [int(x) for x in input().split()]
# def readFloatArr():
#     return [float(x) for x in input().split()]

def queryInteractive(x,y):
    print('? {} {}'.format(x,y))
    sys.stdout.flush()
    return int(input())

def answerInteractive(ans):
    print('! {}'.format(ans))
    sys.stdout.flush()
 
inf=float('inf')
MOD=10**9+7

for _abc in range(1):
    main()