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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class E_Trees_and_Queries {
 
	static int[][] dp;
	static int[] parents;
	static int[] levels;
	static ArrayList<ArrayList<Integer>> adjList;
	
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
	    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
	    int N = sc.nextInt();
	    
	    //Build adj list
	    adjList = new ArrayList<>();
	    for(int i = 0; i < N; i++) {
	    	adjList.add(new ArrayList<Integer>());
	    }
	    for(int i = 0; i < N - 1; i++) {
	    	int a = sc.nextInt() - 1;
	    	int b = sc.nextInt() - 1;
	    	
	    	adjList.get(a).add(b);
	    	adjList.get(b).add(a);
	    }
	    
	    //Build Tree (Node, Parent) and levels array
	    parents = new int[N];  
	    levels = new int[N];
	    populateTree(0, 0);
	    
	    //Build an O(nlogn) dp table - pick node 0 as arbitary root
	    dp = new int[N][(int) Math.ceil(Math.log(N)/Math.log(2)) + 1];
	    populateDP(0, 0);

	    //Compute queries (subtract 1 from each node)
	    int queryCount = sc.nextInt();
	    while(queryCount-- > 0) {
	    	//Add edge from X to Y
	    	int X = sc.nextInt() - 1;
	    	int Y = sc.nextInt() - 1;
	    	//Check distance between A and B
	    	int A = sc.nextInt() - 1;
	    	int B = sc.nextInt() - 1;
	    	//Distance to travel
	    	int K = sc.nextInt();
	    		    	
	    	boolean success = false;
	    	//If path is <= K and has the same parity
	    	if(dist(A, B)%2 == K%2 && dist(A, B) <= K) {
	    		success = true;
	    	}else if((dist(A, X) + 1 + dist(Y, B))%2 == K%2 
	    			&& dist(A, X) + 1 + dist(Y, B) <= K) {
	    		success = true;
	    	}else if((dist(A, Y) + 1 + dist(X, B))%2 == K%2 
	    			&& dist(A, Y) + 1 + dist(X, B) <= K) {
	    		success = true;
	    	}
	    	
	    	if(success)
	    		out.println("YES");
	    	else
	    		out.println("NO");
	    }
	    
	    out.close();
	}
	
	public static int dist(int a, int b) {
		return Math.abs(2*levels[LCA(a, b)] - levels[a] - levels[b]);
	}
	
	public static int LCA(int u, int v) {		
		//Find ancestor of u at same level of v
		if(levels[v] != levels[u]) {
			if(levels[v] > levels[u]) {
				int temp = u;
				u = v;
				v = temp;
			}
			
			int k = (int) Math.ceil(Math.log(levels[u])/Math.log(2));
			while(k >= 0) {	
				//if it's still lower
				//assert k <= dp[u].length
				if(levels[dp[u][k]] >= levels[v])
					u = dp[u][k];
			
				k--;
			}
		}
		
		if(u == v) return u;
		
		//u and v are at same level - employ meta binary search to find their lca
		int k = (int) Math.ceil(Math.log(levels[u])/Math.log(2));
		while(k >= 0) {
			if(dp[u][k] == dp[v][k])
				k--;
			else {
				u = dp[u][k];
				v = dp[v][k];
			}
		}
		
		return parents[u];
	}
	
	
	public static void populateDP(int curr, int parent) {
		//Populate dp row
		dp[curr][0] = parent;
		for(int k = 1; k < dp[curr].length; k++) {
			if(Math.pow(2, k) <= levels[curr])
				dp[curr][k] = dp[dp[curr][k - 1]][k - 1];
			else
				dp[curr][k] = 0;
		}

		//Populate children
		for(int i = 0; i < adjList.get(curr).size(); i++) {
			int child = adjList.get(curr).get(i);
			if(child == parent) continue;
			
			populateDP(child, curr);
		}
	}
	
	public static void populateTree(int curr, int parent) {
		for(int i = 0; i < adjList.get(curr).size(); i++) {
			int child = adjList.get(curr).get(i);
			if(child != parent) {
				parents[child] = curr;
				levels[child] = levels[curr] + 1;
				populateTree(child, curr);
			}
		}
	}
	
	public static class MyScanner {
		BufferedReader br;
	    StringTokenizer st;
	 
	    public MyScanner() {
	       br = new BufferedReader(new InputStreamReader(System.in));
	    }
	 
	    String next() {
	    	while (st == null || !st.hasMoreElements()) {
	    		try {
	    			st = new StringTokenizer(br.readLine());
	            	
	    		} catch (IOException e) {
	    			e.printStackTrace();
	            }
	          }
	    	return st.nextToken();
	   }
	 
	   int nextInt() {
		   return Integer.parseInt(next());
	   }
	 
	   long nextLong() {
		   return Long.parseLong(next());
	   }
	 
	   double nextDouble() {
		   return Double.parseDouble(next());
	   }
	 
	   String nextLine(){
		   String str = "";
		   try {
			   str = br.readLine();
		   } catch (IOException e) {
			   e.printStackTrace();
		   }
		   return str;
	   }
	}
}