import java.io.*;
import java.util.*;
 
public class TreesAndQueries {
	public static int next(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}
 
	static int N, Q;
	static ArrayList<Integer> adjlist[];
	static int[] lvl;
	static LCA lca;
	public static void main(String[] args) throws IOException{
		// TODO Auto-generated method stub
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		// TODO Auto-generated method stub
 
		N = Integer.parseInt(sc.readLine());
		adjlist = new ArrayList[N];
		lvl = new int[N];
		Arrays.fill(lvl, -1);
		for(int i = 0; i < N; i++) adjlist[i] = new ArrayList<Integer>();
		StringTokenizer st;
		for(int i = 1; i < N; i++) {
			st = new StringTokenizer(sc.readLine());
			int u = next(st) - 1;
			int v = next(st) - 1;
			adjlist[u].add(v);
			adjlist[v].add(u);
		}
		lvl[0] = 0;
		dfs0(0);
		lca = new LCA(adjlist, N, 0);
		Q = Integer.parseInt(sc.readLine());
		for(int i = 0; i < Q; i++) {
			st = new StringTokenizer(sc.readLine());
			int x = next(st) - 1, y = next(st) - 1, a = next(st) - 1, b = next(st) - 1, k = next(st);
			int p0 = dist(a, b);
			int p1 = dist(a, x) + dist(b, y) + 1;
			int p2 = dist(a, y) + dist(b, x) + 1;
			int[] m = new int[2];
			m[0] = m[1] = Integer.MAX_VALUE;
			m[p0 % 2] = Math.min(m[p0 % 2], p0);
			m[p1 % 2] = Math.min(m[p1 % 2], p1);
			m[p2 % 2] = Math.min(m[p2 % 2], p2);
			if(m[k % 2] != Integer.MAX_VALUE) {
				System.out.println(((m[k%2] <= k) ? "YES" : "NO"));
			}
			else {
				int c1 = dist(a, x) + dist(a, y) + 1;
				int c2 = dist(b, x) + dist(b, y) + 1;
				if(k % 2 == 0) {
					if(c1 % 2 == 1) {
						m[0] = m[1] + c1;
					}
					if(c2 % 2 == 1) {
						m[0] = Math.min(m[0], m[1] + c2);
					}
					System.out.println(((m[k%2] <= k) ? "YES" : "NO"));
				}
				else {
					if(c1 % 2 == 1) {
						m[1] = m[0] + c1;
					}
					if(c2 % 2 == 1) {
						m[1] = Math.min(m[1], m[0] + c2);
					}
					System.out.println(((m[k%2] <= k) ? "YES" : "NO"));
				}
			}
		}
		
	}
	
	static int dist(int a, int b) {
		int l = lca.lca(a, b);
		return (lvl[a] + lvl[b] - 2*lvl[l]);
	}
	
	static void dfs0(int curr) {
		for(int c : adjlist[curr]) {
			if(lvl[c] == -1) {
				lvl[c] = lvl[curr] + 1;
				dfs0(c);
			}
		}
	}
 
}
 
class LCA {
	public int[] tour;
	public int[] code;
	public int[] antiCode;
	public int[][] rmq;
	public int[] index;
	public LCA(ArrayList<Integer>[] adjlist, int N, int root) {
		tour = new int[2*N-1];
		rmq = new int[2*N-1][32];
		code = new int[N];
		antiCode = new int[N];
		index = new int[N];
		Arrays.fill(index, -1);
		getCodes(adjlist, root, -1, 0);
		createEulerTour(adjlist, root, -1, tour, 0);
		for(int i = 0; i < tour.length; i++) {
			//System.out.println(tour[i]);
			if(index[tour[i]] == -1) {
				index[tour[i]] = i;
			}
		}
		for(int e = 0; e < tour.length; e++) {
			rmq[e][0] = tour[e];
		}
		for(int i = 1; (1<<i) < 2*N-1; i++) {
			for(int e = 0; e + (1<<i) - 1 < 2*N-1; e++) {
				rmq[e][i] = Math.min(rmq[e][i-1], rmq[e+(1<<(i-1))][i-1]);
			}
		}
	}
	
	public int lca(int a, int b) {
		a = code[a];
		b = code[b];
		if(index[b] < index[a]) {
			int t = a;
			a = b;
			b = t;
		}
		int j = 0;
		while((1<<(j+1)) < index[b]-index[a]+1) j++;
		int coded = Math.min(rmq[index[a]][j], rmq[index[b]-(1<<j)+1][j]);
		return antiCode[coded];
	}
	
	public int getCodes(ArrayList<Integer>[] adjlist, int curr, int p, int currCode) {
		code[curr] = currCode;
		antiCode[currCode] = curr;
		currCode++;
		for(int c : adjlist[curr]) {
			if(c == p) continue;
			currCode = getCodes(adjlist, c, curr, currCode);
		}
		return currCode;
	}
	
	public int createEulerTour(ArrayList<Integer>[] adjlist, int curr, int p, int[] tour, int index) {
		for(int c : adjlist[curr]) {
			if(c == p) continue;
			tour[index] = code[curr];
			index++;
			index = createEulerTour(adjlist, c, curr, tour, index);
		}
		tour[index] = code[curr];
		index++;
		return index;
	}
}