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.*;
import java.util.*;
public class BinaryLiftingQueries {
	static int log;
	static ArrayList<Integer>[] adj;
	static int[] level;
	static int[][] jump;
	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		JS scan = new JS();
		int n = scan.nextInt();
		log = (int)Math.ceil(Math.log(n) / Math.log(2)); 
		adj = new ArrayList[n];
		level = new int[n];
		jump = new int[n][log+1];
		for(int i = 0;i<n;i++) {
			adj[i] = new ArrayList<Integer>();
		}
		for(int i =0 ;i<n-1;i++) {
			int a = scan.nextInt()-1;
			int b = scan.nextInt()-1;
			adj[a].add(b);
			adj[b].add(a);
		}
		dfs(0,0);
		//System.out.println(lca(1,7));
		int q = scan.nextInt();
		for(int i = 0;i<q;i++) {
			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 dist1 = dist(a,b);
			if(a==b)dist1=2;
			int dist2 = dist(a,x)+dist(b,y)+1;
			int dist3 = dist(a,y)+dist(b,x)+1;
			dist2 = Math.min(dist2,dist3);
			boolean good = false;
			if(dist1<=k) {
				if((k-dist1)%2==0) good = true;
			}
			if(dist2<=k) {
				if((k-dist2)%2==0)good = true;
			}
			out.println(good?"YES":"NO");
//			int gcd = gcd(dist1,dist2);
//			gcd = gcd(gcd,dist3);
//			System.out.println(gcd+" "+dist1+" "+dist2+" "+dist3);
//			out.println(k%gcd == 0 ? "YES" : "NO");
		}
		out.flush();
		out.close();
	}
/*
3
1 2
2 3
2
1 3 1 1 1
1 3 1 1 2
 */
	static int gcd (int a, int b) {
		if(b==0)return a;
		return gcd(b,a%b);
	}
	static int dist (int u, int v) {
		return level[u]+level[v]-2*level[lca(u,v)];
	}
	static void dfs (int u, int parent) {
		jump[u][0] = parent;
		for(int i = 1;i<=log;i++) {
			jump[u][i] = jump[jump[u][i-1]][i-1];
		}
		for(int v :adj[u]) {
			if(v!=parent) {
				level[v] = level[u]+1;
				dfs(v,u);
			}
		}
	}
	static int lca (int u, int v) {
		//find which one is farther from the root, we use u as our lower one
		if(level[u]<level[v]) {
			int temp = u;
			u = v;
			v = temp;
		}
		//lift the lower one to the same level
		for(int i = log;i>=0;i--) {
			if(level[jump[u][i]]>=level[v]) {
				u = jump[u][i];
			}
		}
		//if v is the ancestor of u, then v is the lca between the two
		if(u==v) return u;
		//lift them both until their immediate parents match
		for(int i = log;i>=0;i--) {
			if(jump[u][i] != jump[v][i]) {
				u = jump[u][i];
				v = jump[v][i];
			}
		}
		return jump[u][0];
	}
	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;
			}
		}
	}

}
