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 OneTreesAndQueries {

	static int n;
	static int[] depth;
	static int[] lo;
	static int[] hi;
	static int arc = 0;
	static int d;
	static int lift[][];

	
	static ArrayList<Integer>[] graph;
	
	public static void main(String[] args) {
		JS scan = new JS();
		PrintWriter out = new PrintWriter(System.out);
		n = scan.nextInt();
		graph = new ArrayList[n];
		for(int i = 0; i < n; i++) graph[i] = new ArrayList<Integer>();
		for(int i = 0; i < n-1; i++){
			int u = scan.nextInt()-1;
			int v = scan.nextInt()-1;
			graph[u].add(v);
			graph[v].add(u);
		}
		depth = new int[n];
		d = Integer.numberOfTrailingZeros(Integer.highestOneBit(n)) + 2;
		lift = new int[d][n];
		for(int i = 0 ; i < d ; i++) Arrays.fill(lift[i], -1);
		Deque<Integer> q = new ArrayDeque<>();
		q.add(0);
		while(!q.isEmpty()) {
			int u = q.pop();
			for(int v : graph[u]) {
				if(lift[0][u] != v) {
					lift[0][v] = u;
					depth[v] = depth[u] + 1;
					q.add(v);
				}
			}
		}
		for(int k = 0 ; k < d - 1 ; k++)
			for(int i = 0 ; i < n ; i++)
				if(lift[k][i] != -1)
					lift[k + 1][i] = lift[k][lift[k][i]];
//		dfs(0, -1);
		int t = scan.nextInt();
		for(int qq = 1; qq <= t; qq++){
			int x = scan.nextInt()-1;
			int y = scan.nextInt()-1;
			int a = scan.nextInt()-1;
			int b = scan.nextInt()-1;
			int k = scan.nextInt();
			
			int temp = x;
			x = a;
			a = temp;
			
			temp = y;
			y = b;
			b = temp;
			
			if(dist(x, y) <= k && dist(x, y )% 2 == k % 2){
				out.println("YES");
				continue;
			}
			int d = dist(x, a)+dist(b, y)+1;
			if(d <= k && d % 2 == k % 2){
				out.println("YES");
				continue;
			}
			d = dist(x, b)+dist(a, y)+1;
			if(d <= k && d % 2 == k % 2){
				out.println("YES");
				continue;
			}
			out.println("NO");
		}
		out.flush();
	}
	
	static int lca(int u, int v) {
		if(depth[v] > depth[u]) return lca(v, u);
		u = walk(u, depth[u] - depth[v]);
		if(u == v) return u;
		for(int k = d - 1 ; k >= 0 ; k--) {
			if(lift[k][u] != lift[k][v]) {
				u = lift[k][u];
				v = lift[k][v];
			}
		}
		return lift[0][u];
	}
	static int walk(int u, int k) {
		for(int i = 0 ; i < d && u != -1 ; i++) if((k & (1 << i)) > 0) u = lift[i][u];
		return u;
	}
	static int dist(int u, int v) { return depth[u] + depth[v] - (2 * depth[lca(u, v)]); }
	
	static void dfs(int curr, int par){
//		lo[curr] = arc++;
		for(int i = 0; i < graph[curr].size(); i++){
			int to = graph[curr].get(i);
			if(to != par){
				depth[to] = depth[curr]+1;
				dfs(to, curr);
			}
		}
//		hi[curr] = arc;
	}

	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;
 
		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}
 
		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}
 
		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}				
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}
 
		public int nextInt() {
			return (int)nextLong();
		}
 
		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}
 
		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}
 
		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}
 
		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}
 
		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
	}
}
