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 collections import deque

# <IO>
import os
import sys
from atexit import register
from io import BytesIO
 
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
input = lambda: sys.stdin.readline().rstrip()
 
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
# </IO>

n = int(input())

g = [[] for _ in range(n)] # adjacency lists
for _ in range(n - 1):
    v, to = map(int, input().split())
    v -= 1
    to -= 1
    g[v].append(to)
    g[to].append(v)

root = 0
visited = [False] * n
cs = [[] for _ in range(n)]
queue = deque([root])
while queue:
    v = queue.popleft()
    if not visited[v]:
        visited[v] = True
        for to in g[v]:
            cs[v].append(to)
            queue.append(to)

visited = [False] * n
stack = [(0, root)]  # (depth, vertex)
traversal = []       # (depth, vertex)
enters = [-1] * n
while stack:
    depth, v = stack.pop()
    if not visited[v]:
        visited[v] = True
        enters[v] = len(traversal)
        for child in cs[v]:
            stack.append((depth, v))
            stack.append((depth + 1, child))
    traversal.append((depth, v))

N = len(traversal) # N=2n-1
k = 1              # min power of 2 >= N
while (1<<k) < N:
    k += 1

ST = [[float('inf')] * k for _ in range(N)]
for i in range(N):
    ST[i][0] = traversal[i]
for j in range(1, k):
    for i in range(N):
        if i + (1<<j) > N:
            continue
        ST[i][j] = min(ST[i][j - 1], ST[i + (1<<(j-1))][j - 1])

log_len = [0] * (N + 1)
for i in range(2, N + 1):
    log_len[i] = log_len[i>>1] + 1
# print(k, 1<<k, N)

q = int(input())
for _ in range(q):
    x, y, a, b, k = map(int, input().split())
    x -= 1
    y -= 1
    a -= 1
    b -= 1
    
    Ia = enters[a]
    Ib = enters[b]
    da, _ = traversal[Ia]
    db, _ = traversal[Ib]
    L = min(Ia, Ib)
    R = max(Ia, Ib)
    j = log_len[R - L + 1]
    depth, lca = min(ST[L][j], ST[R - (1<<j) + 1][j])
    curr = da - depth + db - depth
    if curr <= k and (k - curr) % 2 == 0:
        sys.stdout.write('YES'.encode() + b'\n')
        continue
    
    Ix = enters[x]
    Iy = enters[y]
    dx, _ = traversal[Ix]
    dy, _ = traversal[Iy]
    
#     a - x - y - b
    L = min(Ia, Ix)
    R = max(Ia, Ix)
    j = log_len[R - L + 1]
    depth, lca = min(ST[L][j], ST[R - (1<<j) + 1][j])
    part_ax = da - depth + dx - depth
    
    L = min(Ib, Iy)
    R = max(Ib, Iy)
    j = log_len[R - L + 1]
    depth, lca = min(ST[L][j], ST[R - (1<<j) + 1][j])
    part_by = db - depth + dy - depth
    
    curr = part_ax + 1 + part_by
    if curr <= k and (k - curr) % 2 == 0:
        sys.stdout.write('YES'.encode() + b'\n')
        continue
    
#     a - y - x - b
    L = min(Ia, Iy)
    R = max(Ia, Iy)
    j = log_len[R - L + 1]
    depth, lca = min(ST[L][j], ST[R - (1<<j) + 1][j])
    part_ay = da - depth + dy - depth
    
    L = min(Ib, Ix)
    R = max(Ib, Ix)
    j = log_len[R - L + 1]
    depth, lca = min(ST[L][j], ST[R - (1<<j) + 1][j])
    part_bx = db - depth + dx - depth
    
    curr = part_ay + 1 + part_bx
    if curr <= k and (k - curr) % 2 == 0:
        sys.stdout.write('YES'.encode() + b'\n')
        continue
    
    sys.stdout.write('NO'.encode() + b'\n')
