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.*;
import java.math.*;
import java.awt.Point;
 
public class Main {
	//static final long MOD = 998244353L;
	//static final long INF = -1000000000000000007L;
	static final long MOD = 1000000007L;
	//static final int INF = 1000000007;
	
	//static long[] factorial;
	
	static int[] depth;
	static int N;
	static ArrayList<Integer>[] tree;
	static ArrayList<Integer> euler;
	static boolean[] visited;
	static int[] first;
	static SegmentTree lcaST;
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter pw = new PrintWriter(System.out);
		N = sc.ni();
		ArrayList<Integer>[] oldTree = new ArrayList[N];
		for (int i = 0; i < N; i++) {
			oldTree[i] = new ArrayList<Integer>();
		}
		for (int i = 0; i < N-1; i++) {
			int n1 = sc.ni()-1;
			int n2 = sc.ni()-1;
			oldTree[n1].add(n2);
			oldTree[n2].add(n1);
		}
		
		//make sure the number of a node is smaller than all of its children
		int[] map = new int[N];
		Arrays.fill(map,-1);
		ArrayDeque<Integer> bfs = new ArrayDeque<Integer>();
		bfs.add(0);
		map[0] = 0;
		int index = 1;
		while (!bfs.isEmpty()) {
			int n = bfs.poll();
			for (int next: oldTree[n]) {
				if (map[next]==-1) {
					map[next] = index;
					index++;
					bfs.add(next);
				}
			}
		}
		tree = new ArrayList[N];
		for (int i = 0; i < N; i++)
			tree[i] = new ArrayList<Integer>();
		
		for (int i = 0; i < N; i++) {
			for (int child: oldTree[i]) {
				tree[map[i]].add(map[child]);
			}
		}
		
		
		depth = new int[N];
		
		euler = new ArrayList<Integer>();
		visited = new boolean[N];
		first = new int[N];
		dfs(0,0);
		
		long[] etour = new long[euler.size()];
		for (int i = 0; i < euler.size(); i++)
			etour[i] = (long)euler.get(i);
		
		lcaST = new SegmentTree(etour);
		
		int Q = sc.ni();
		for (int q = 0; q < Q; q++) {
			int X = map[sc.ni()-1];
			int Y = map[sc.ni()-1];
			int A = map[sc.ni()-1];
			int B = map[sc.ni()-1];
			int K = sc.ni();
			
			int ab = lcaDist(A,B);
			int axyb = lcaDist(A,X)+1+lcaDist(Y,B);
			int ayxb = lcaDist(A,Y)+1+lcaDist(X,B);
			
			if ((ab <= K && (K-ab)%2==0)||(axyb <= K && (K-axyb)%2==0)||(ayxb <= K && (K-ayxb)%2==0)) {
				//it is possible
				pw.println("YES");
			} else {
				pw.println("NO");
			}
		}
		pw.close();
	}
	
	public static int lcaDist(int node1, int node2) {
		int i1 = first[node1]+1;
		int i2 = first[node2]+1;
		int temp = Math.max(i1,i2);
		i1 = Math.min(i1,i2);
		i2 = temp;
		int lcaNode = (int)lcaST.minQuery(1, 1, euler.size(), i1, i2);
		
		if (i1 == i2) {
			return 0;
		} else {
			return ((depth[node1]-depth[lcaNode])+(depth[node2]-depth[lcaNode]));
		}
	}

	public static void dfs(int node, int h) {
		visited[node] = true;
		depth[node] = h;
		first[node] = euler.size();
		euler.add(node);
        for (int next: tree[node]) {
            if (!visited[next]) {
                dfs(next, h + 1);
                euler.add(node);
            }
        }
	}
	
	static class SegmentTree {

		public long[][] ranges;

		public SegmentTree(long[] array) {
			ranges = new long[4*array.length+1][4];
			for (int i = 0; i < array.length; i++) {
				add(1,1,array.length,i+1,i+1,array[i]);
			}
		}

		//range update nums[updateL..updateR] += val;
		public void add(int n, int L, int R, int updateL, int updateR, long val) {
			push(n,L,R);
			if (updateL <= L && R <= updateR) {
				//fully contained
				ranges[n][3] += val;
				push(n,L,R);
				return;
			} else if (L>updateR || R<updateL || L==R) {
				//not contained at all or leaf
				return;
			}
			add(2*n,L,(L+R)/2,updateL,updateR,val); 
			add(2*n+1,(L+R)/2+1,R,updateL,updateR,val);
			ranges[n][1] = Math.min(ranges[2*n][1],ranges[2*n+1][1]);
			ranges[n][2] = Math.max(ranges[2*n][2],ranges[2*n+1][2]);
			ranges[n][0] = ranges[2*n][0] + ranges[2*n+1][0];
		}

		public long minQuery(int n, int L, int R, int Lq, int Rq) {
			push(n,L,R);
			if (Lq <= L && R <= Rq) {
				return ranges[n][1];
			} else if (R < Lq || Rq < L || L==R) {
				return 1000000000000007L;
			} else {
				return Math.min(minQuery(2*n,L,(L+R)/2,Lq,Rq),minQuery(2*n+1,(L+R)/2+1,R,Lq,Rq));
			}
		}

		public long maxQuery(int n, int L, int R, int Lq, int Rq) {
			push(n,L,R);
			if (Lq <= L && R <= Rq) {
				return ranges[n][2];
			} else if (R < Lq || Rq < L || L==R) {
				return -1L;
			} else {
				return Math.max(maxQuery(2*n,L,(L+R)/2,Lq,Rq),maxQuery(2*n+1,(L+R)/2+1,R,Lq,Rq));
			}
		}

		public long sumQuery(int n, int L, int R, int Lq, int Rq) {
			push(n,L,R);
			if (Lq <= L && R <= Rq) {
				return ranges[n][0];
			} else if (R < Lq || Rq < L || L==R) {
				return 0L;
			} else {
				return (sumQuery(2*n,L,(L+R)/2,Lq,Rq) + sumQuery(2*n+1,(L+R)/2+1,R,Lq,Rq));
			}
		}

		public void push(int n, int L, int R) {
			ranges[n][1] += ranges[n][3];
			ranges[n][2] += ranges[n][3];
			ranges[n][0] += (R-L+1)*ranges[n][3];

			if (L < R) {
				ranges[2*n][3] += ranges[n][3];
				ranges[2*n+1][3] += ranges[n][3];
			}

			ranges[n][3] = 0;
		}
	}
	
	public static long dist(long[] p1, long[] p2) {
		return (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));
	}
	
	//Find the GCD of two numbers
	public static long gcd(long a, long b) {
		if (a < b) return gcd(b,a);
		if (b == 0)
			return a;
		else
			return gcd(b,a%b);
	}
	
	//Fast exponentiation (x^y mod m)
	public static long power(long x, long y, long m) { 
		if (y < 0) return 0L;
		long ans = 1;
		x %= m;
		while (y > 0) { 
			if(y % 2 == 1) 
				ans = (ans * x) % m; 
			y /= 2;  
			x = (x * x) % m;
		} 
		return ans; 
	}
	
	public static int[][] shuffle(int[][] array) {
		Random rgen = new Random();
		for (int i = 0; i < array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    int[] temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}
		return array;
	}
	
    public static int[][] sort(int[][] array) {
    	//Sort an array (immune to quicksort TLE)
 
		Arrays.sort(array, new Comparator<int[]>() {
			  @Override
        	  public int compare(int[] a, int[] b) {
				  return b[0]-a[0]; //descending order
	          }
		});
		return array;
	}
    
    public static long[][] sort(long[][] array) {
    	//Sort an array (immune to quicksort TLE)
		Random rgen = new Random();
		for (int i = 0; i < array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    long[] temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}
		Arrays.sort(array, new Comparator<long[]>() {
			  @Override
        	  public int compare(long[] a, long[] b) {
				  if (a[0] < b[0])
					  return -1;
				  else
					  return 1;
	          }
		});
		return array;
	}
    
    static class FastScanner { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastScanner() { 
            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 ni() { 
            return Integer.parseInt(next()); 
        } 
  
        long nl() { 
            return Long.parseLong(next()); 
        } 
  
        double nd() { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() { 
            String str = ""; 
            try { 
                str = br.readLine(); 
            } catch (IOException e) {
                e.printStackTrace(); 
            } 
            return str;
        }
    }
}