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 LowestCommonAncestor {
	static Map<Integer, ArrayList<Integer>> graph;
	static int[] depth;
	static int[] parent;
	static int[][] twoancestor;
	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
//	 		String input1 = bf.readLine().trim();
//	 		String input2 = bf.readLine().trim();
 			int n = Integer.parseInt(bf.readLine());
	 		graph = new HashMap<Integer, ArrayList<Integer>>();
	 		for(int j = 1;j<=n;j++){
	 			graph.put(j,  new ArrayList<Integer>());
	 		}
	 		for(int j=0;j<n-1;j++){
	 			StringTokenizer st = new StringTokenizer(bf.readLine());
	 			int v1 = Integer.parseInt(st.nextToken());
	 			int v2 = Integer.parseInt(st.nextToken());
	 			graph.get(v1).add(v2);
	 			graph.get(v2).add(v1);
	 		}
	 		depth = new int[n+1];
	 		parent = new int[n+1];
	 		parent[1] = -1;
	 		depths(1, -1);
	 		
	 		twoancestor = new int[n+1][18];
	 		for(int j = 1;j<=n;j++){
	 			twoancestor[j][0] = parent[j];
	 		}
	 		for(int j = 1;j<18;j++){
	 			for(int k = 1;k<=n;k++){
	 				if (twoancestor[k][j-1] == -1)
	 					twoancestor[k][j] = -1;
	 				else
	 					twoancestor[k][j] = twoancestor[twoancestor[k][j-1]][j-1];
	 			}
	 		}
	 		
	 		
	 		
	 		
	 		
	 		
	 		int q = Integer.parseInt(bf.readLine());
	 		for(int j= 0;j<q;j++){
	 			StringTokenizer st = new StringTokenizer(bf.readLine());
	 			int x = Integer.parseInt(st.nextToken());
	 			int y = Integer.parseInt(st.nextToken());
	 			int a = Integer.parseInt(st.nextToken());
	 			int b = Integer.parseInt(st.nextToken());
	 			int k = Integer.parseInt(st.nextToken());
	 			int ab = shortestpath(a, b);
	 			int ax = shortestpath(a, x);
	 			int ay = shortestpath(a, y);
	 			int bx = shortestpath(b, x);
	 			int by = shortestpath(b, y);
	 			int minusing = Math.min(ax+1+by, ay+1+bx);
	 			int minnotusing = ab;
	 			if ((k >= minusing && k%2 == minusing%2) || (k >= minnotusing && k%2 == minnotusing%2))
	 				out.println("YES");
	 			else
	 				out.println("NO");
	 			
	 			
	 			
	 		}
	 		
	 		
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
	public static void depths(int v, int p){
		for(int child : graph.get(v)){
			if (child == p)
				continue;
			parent[child] = v;
			depth[child] = depth[v]+1;
			depths(child, v);
		}
	}
	public static int shortestpath(int x, int y){
		int depthx = depth[x];
			int depthy = depth[y];
			int tempx = x;
			int tempy = y;
			if (depthx > depthy){
				int height = depthx-depthy;
				String hdiff = Integer.toBinaryString(height);
				for(int i = 0;i<hdiff.length();i++){
					if (hdiff.charAt(hdiff.length()-1-i) == '1'){
						tempx = twoancestor[tempx][i];
					}
				}
			}
			else{
				int height = depthy-depthx;
				String hdiff = Integer.toBinaryString(height);
				for(int i = 0;i<hdiff.length();i++){
					if (hdiff.charAt(hdiff.length()-1-i) == '1'){
						tempy = twoancestor[tempy][i];
					}
				}
					
			}
			int index = 17;
			while(index >=0){
				if (twoancestor[tempx][index] != twoancestor[tempy][index]){
					tempx = twoancestor[tempx][index];
					tempy = twoancestor[tempy][index];
				}
				index--;
			}
			if (tempx != tempy){
				tempx = parent[tempx];
				tempy = parent[tempy];
			}
			return depth[x]-depth[tempx] + depth[y]-depth[tempy];
	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	


