import java.util.*;
import java.io.*;
public class LowestCommonAncestor {
	static Map<Integer, ArrayList<Integer>> graph;
	static int[] depth;
	static int[] parent;
	static int[][] twoancestor;
	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
//	 		String input1 = bf.readLine().trim();
//	 		String input2 = bf.readLine().trim();
 			int n = Integer.parseInt(bf.readLine());
	 		graph = new HashMap<Integer, ArrayList<Integer>>();
	 		for(int j = 1;j<=n;j++){
	 			graph.put(j,  new ArrayList<Integer>());
	 		}
	 		for(int j=0;j<n-1;j++){
	 			StringTokenizer st = new StringTokenizer(bf.readLine());
	 			int v1 = Integer.parseInt(st.nextToken());
	 			int v2 = Integer.parseInt(st.nextToken());
	 			graph.get(v1).add(v2);
	 			graph.get(v2).add(v1);
	 		}
	 		depth = new int[n+1];
	 		parent = new int[n+1];
	 		parent[1] = -1;
	 		depths(1, -1);
	 		
	 		twoancestor = new int[n+1][18];
	 		for(int j = 1;j<=n;j++){
	 			twoancestor[j][0] = parent[j];
	 		}
	 		for(int j = 1;j<18;j++){
	 			for(int k = 1;k<=n;k++){
	 				if (twoancestor[k][j-1] == -1)
	 					twoancestor[k][j] = -1;
	 				else
	 					twoancestor[k][j] = twoancestor[twoancestor[k][j-1]][j-1];
	 			}
	 		}
	 		
	 		
	 		
	 		
	 		
	 		
	 		int q = Integer.parseInt(bf.readLine());
	 		for(int j= 0;j<q;j++){
	 			StringTokenizer st = new StringTokenizer(bf.readLine());
	 			int x = Integer.parseInt(st.nextToken());
	 			int y = Integer.parseInt(st.nextToken());
	 			int a = Integer.parseInt(st.nextToken());
	 			int b = Integer.parseInt(st.nextToken());
	 			int k = Integer.parseInt(st.nextToken());
	 			int ab = shortestpath(a, b);
	 			int ax = shortestpath(a, x);
	 			int ay = shortestpath(a, y);
	 			int bx = shortestpath(b, x);
	 			int by = shortestpath(b, y);
	 			int minusing = Math.min(ax+1+by, ay+1+bx);
	 			int minnotusing = ab;
	 			if ((k >= minusing && k%2 == minusing%2) || (k >= minnotusing && k%2 == minnotusing%2))
	 				out.println("YES");
	 			else
	 				out.println("NO");
	 			
	 			
	 			
	 		}
	 		
	 		
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
	public static void depths(int v, int p){
		for(int child : graph.get(v)){
			if (child == p)
				continue;
			parent[child] = v;
			depth[child] = depth[v]+1;
			depths(child, v);
		}
	}
	public static int shortestpath(int x, int y){
		int depthx = depth[x];
			int depthy = depth[y];
			int tempx = x;
			int tempy = y;
			if (depthx > depthy){
				int height = depthx-depthy;
				String hdiff = Integer.toBinaryString(height);
				for(int i = 0;i<hdiff.length();i++){
					if (hdiff.charAt(hdiff.length()-1-i) == '1'){
						tempx = twoancestor[tempx][i];
					}
				}
			}
			else{
				int height = depthy-depthx;
				String hdiff = Integer.toBinaryString(height);
				for(int i = 0;i<hdiff.length();i++){
					if (hdiff.charAt(hdiff.length()-1-i) == '1'){
						tempy = twoancestor[tempy][i];
					}
				}
					
			}
			int index = 17;
			while(index >=0){
				if (twoancestor[tempx][index] != twoancestor[tempy][index]){
					tempx = twoancestor[tempx][index];
					tempy = twoancestor[tempy][index];
				}
				index--;
			}
			if (tempx != tempy){
				tempx = parent[tempx];
				tempy = parent[tempy];
			}
			return depth[x]-depth[tempx] + depth[y]-depth[tempy];
	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	


