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.*;
import java.math.*;

/**
 *
 * @Har_Har_Mahadev
 */

public class E {

	private static long INF = 2000000000000000000L, M = 1000000007, MM = 998244353;
	
	
	
    
    //static ArrayList<Integer> arr[];
    static int N = 100001;
    
    static int maxN = log2(N);
    static int level[] = new int[N];
    static int LCA[][] = new int[N][maxN+1];

	private static ArrayList<Integer>[] arr;
  
	private static void init(int n) {
			
		dfsForLCA(1,0,-1);
		
		for(int i=1; i<=maxN; i++) {
			for(int j=1; j<=n; j++) {
				
				if(LCA[j][i-1] != -1) {
					
					int par = LCA[j][i-1];
					LCA[j][i] = LCA[par][i-1];
				}
				
			}
		}
			
	}
	
	private static void dfsForLCA(int node, int lvl, int par) {
		
		level[node] = lvl;
		LCA[node][0] = par;
		
		for(int child : arr[node]) {
			if(child != par) {
				dfsForLCA(child, lvl+1, node);
			}
		}
		
		
	}
	
	
	private static int getLCA(int x, int y) {
		int a = -1;
		int b = -1;
		if(level[x] > level[y]) {
			b = x;
			a = y;
		}
		else {
			a = x;
			b = y;
		}
		
		
		int d = level[b] - level[a];
		
		while(d > 0) {
			int i = log2(d);
			b = LCA[b][i];
			d -= (1<<i);
			
		}
		
		if(a == b)return a;
		
		for(int i=maxN; i>=0; i--) {
		
			if(LCA[a][i] != -1 && (LCA[a][i] != LCA[b][i])) {
				a = LCA[a][i];
				b = LCA[b][i];
			}
		}
			
		return LCA[a][0];
	}

	
	
	// get Distance Between Two Node
	
	static int getDistance(int a, int b) {
		int lca = getLCA(a, b);
		return level[a] + level[b] - 2*level[lca];
	}



	public static void process() throws IOException {

		int n = sc.nextInt();
	      for(int i=1; i<=n; i++) {
	      	for(int j=0; j<=maxN; j++)
	      		LCA[i][j] = -1;
	      }
	      
	      arr = new ArrayList[n+1];
	      for(int i = 0;i <= n;i++){
	          arr[i] = new ArrayList<>();
	      }

	      for(int i=1; i<n; i++) {
	      	int a = sc.nextInt(),b = sc.nextInt();
	      	arr[a].add(b);
	      	arr[b].add(a);
	      }
	      
	      init(n);
	      
	      int m =sc.nextInt();
	      ff:for(int i=0; i<m; i++) {
	    	  int x = sc.nextInt(),y = sc.nextInt(),a = sc.nextInt(),b = sc.nextInt(),k = sc.nextInt();
	     	  
	    	  int dis = getDistance(a, b);
	    	  if(dis <= k && (dis%2 == k%2)) {
	    		  println("YES");
	    		  continue ff;
	    	  }
	    	  dis = getDistance(a, x) + getDistance(b, y) + 1;
	    	  if(dis <= k && (dis%2 == k%2)) {
	    		  println("YES");
	    		  continue ff;
	    	  }
	    	  dis = getDistance(b, x) + getDistance(a, y) + 1;
	    	  if(dis <= k && (dis%2 == k%2)) {
	    		  println("YES");
	    		  continue ff;
	    	  }
	    	  println("NO");
	    	  
	      }
	      

	}

	//=============================================================================
	//--------------------------The End---------------------------------
	//=============================================================================

	static FastScanner sc;
	static PrintWriter out;

	public static void main(String[] args) throws IOException {
		boolean oj = true;
		if (oj) {
			sc = new FastScanner();
			out = new PrintWriter(System.out);
		} else {
			sc = new FastScanner(100);
			out = new PrintWriter("output.txt");
		}
		int t = 1;
//		t = sc.nextInt();
		while (t-- > 0) {
			process();
		}
		out.flush();
		out.close();
	}

	static class Pair implements Comparable<Pair> {
		int x, y;

		Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public int compareTo(Pair o) {
			return Integer.compare(this.x, o.x);
		}

		//		 @Override
		//		    public boolean equals(Object o) {
		//		        if (this == o) return true;
		//		        if (!(o instanceof Pair)) return false;
		//		        Pair key = (Pair) o;
		//		        return x == key.x && y == key.y;
		//		    }
		//		 
		//		    @Override
		//		    public int hashCode() {
		//		        int result = x;
		//		        result = 31 * result + y;
		//		        return result;
		//		    }
	}

	/////////////////////////////////////////////////////////////////////////////////////////////////////////

	static void println(Object o) {
		out.println(o);
	}

	static void println() {
		out.println();
	}

	static void print(Object o) {
		out.print(o);
	}

	static void pflush(Object o) {
		out.println(o);
		out.flush();
	}

	static int ceil(int x, int y) {
		return (x % y == 0 ? x / y : (x / y + 1));
	}

	static long ceil(long x, long y) {
		return (x % y == 0 ? x / y : (x / y + 1));
	}

	static int max(int x, int y) {
		return Math.max(x, y);
	}

	static int min(int x, int y) {
		return Math.min(x, y);
	}

	static int abs(int x) {
		return Math.abs(x);
	}

	static long abs(long x) {
		return Math.abs(x);
	}

	static int log2(int N) {
		int result = (int) (Math.log(N) / Math.log(2));
		return result;
	}

	static long max(long x, long y) {
		return Math.max(x, y);
	}

	static long min(long x, long y) {
		return Math.min(x, y);
	}

	public static int gcd(int a, int b) {
		BigInteger b1 = BigInteger.valueOf(a);
		BigInteger b2 = BigInteger.valueOf(b);
		BigInteger gcd = b1.gcd(b2);
		return gcd.intValue();
	}

	public static long gcd(long a, long b) {
		BigInteger b1 = BigInteger.valueOf(a);
		BigInteger b2 = BigInteger.valueOf(b);
		BigInteger gcd = b1.gcd(b2);
		return gcd.longValue();
	}

	/////////////////////////////////////////////////////////////////////////////////////////////////////////

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner() throws FileNotFoundException {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		FastScanner(int a) throws FileNotFoundException {
			br = new BufferedReader(new FileReader("input.txt"));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		String nextLine() throws IOException {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		int[] readArray(int n) throws IOException {
			int[] A = new int[n];
			for (int i = 0; i != n; i++) {
				A[i] = sc.nextInt();
			}
			return A;
		}

		long[] readArrayLong(int n) throws IOException {
			long[] A = new long[n];
			for (int i = 0; i != n; i++) {
				A[i] = sc.nextLong();
			}
			return A;
		}
	}

	static void ruffleSort(int[] a) {
		Random get = new Random();
		for (int i = 0; i < a.length; i++) {
			int r = get.nextInt(a.length);
			int temp = a[i];
			a[i] = a[r];
			a[r] = temp;
		}
		Arrays.sort(a);
	}

	static void ruffleSort(long[] a) {
		Random get = new Random();
		for (int i = 0; i < a.length; i++) {
			int r = get.nextInt(a.length);
			long temp = a[i];
			a[i] = a[r];
			a[r] = temp;
		}
		Arrays.sort(a);
	}
}
