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.*;

public class _E {
	long mod = 1000000007;
	ArrayList<Integer> adj[];
	void solve() throws IOException, IllegalArgumentException, IllegalAccessException {
		int n=in.nextInt();
		adj=new ArrayList[n];
		for(int i=0;i<n;i++)adj[i]=new ArrayList<>();
		for(int i=0;i<n-1;i++) {
			int u=in.nextInt()-1, v=in.nextInt()-1;
			adj[u].add(v);
			adj[v].add(u);
		}
		LCA bl=new LCA(n,adj);
		bl.build(0);
		int q=in.nextInt();
		for(int i=0;i<q;i++) {
			int x=in.nextInt()-1,y=in.nextInt()-1,a=in.nextInt()-1,b=in.nextInt()-1,k=in.nextInt();
			int dis1 = bl.dist(a, b), dis2 = bl.dist(a, x) + bl.dist(b, y) + 1, dis3 = bl.dist(b, x) + bl.dist(a, y) + 1;
			out.println((dis1 <= k && dis1 % 2 == k % 2) || (dis2 <= k && dis2 % 2 == k % 2) || (dis3 <= k && dis3 % 2 == k % 2) ? "YES" : "NO");
//			if(bl.dist(a, b)<=k && (k-bl.dist(a, b))%2==0) {
//				out.println("YES");
//			}
//			else if(bl.dist(a, x)+bl.dist(y, b)+1<=k && (k-bl.dist(a, x)-bl.dist(y, b)-1)%2==0) {
//				out.println("YES");
//			}
//			else if(bl.dist(a, y)+bl.dist(x, b)+1<=k && (k-bl.dist(a, y)-bl.dist(x, b)-1)%2==0) {
//				out.println("YES");
//			}
//			else {
//				out.println("NO");
//			}
		}
	}
	static class LCA {
        public int[][] par;
        public int[] lvl;
        public final int LOG;
        public final int n;
        public ArrayList<Integer>[] a;
 
        public LCA(int n, ArrayList<Integer>[] aa) {
            a = aa;
            this.n = n;
            LOG = log2(n) + 1;
            par = new int[n][LOG];
            lvl = new int[n];
        }
 
        public void build(int u) {
            dfs(u, -1, 0);
            for (int j = 1; j < LOG; j++)
                for (int i = 0; i < n; i++) {
                    par[i][j] = -1;
                    if (par[i][j - 1] != -1) par[i][j] = par[par[i][j - 1]][j - 1];
                }
        }
 
        public void dfs(int cur, int p, int l) {
            par[cur][0] = p;
            lvl[cur] = l;
            for (int i : a[cur]) if (i != p) dfs(i, cur, l + 1);
        }
 
        public int query(int u, int v) {
            if (lvl[u] < lvl[v]) {
                int t = u;
                u = v;
                v = t;
            }
            int dis = lvl[u] - lvl[v];
            while (dis > 0) {
                int raise = log2(dis);
                u = par[u][raise];
                dis ^= 1 << raise;
            }
            if (u == v) return u;
            for (int i = LOG - 1; i >= 0; i--) {
                if (par[u][i] != -1 && par[u][i] != par[v][i]) {
                    u = par[u][i];
                    v = par[v][i];
                }
            }
            return par[u][0];
        }
 
        public int dist(int u, int v) {
            return lvl[u] + lvl[v] - (lvl[query(u, v)] << 1);
        }
 
        public int log2(int i) {
            int cnt = -1;
            while (i > 0) {
                i >>= 1;
                cnt++;
            }
            return cnt;
        }
 
    }
	
	public static void main(String[] args) throws IOException, IllegalArgumentException, IllegalAccessException {
		new _E();
	}

	Debug db;
	InputReader in;
	PrintWriter out;
	StringTokenizer st;

	_E() throws IOException, IllegalArgumentException, IllegalAccessException {
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		db = new Debug(System.getSecurityManager() == null);
		solve();
		out.close();
	}

	class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

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

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

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int arr[] = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = this.nextInt();
			}
			return arr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long arr[] = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = this.nextLong();
			}
			return arr;
		}
	}

	class Pair implements Comparable<Pair> {
		public int x;
		public int y;

		Pair(int a, int b) {
			x = a;
			y = b;
		}

		@Override
		public int compareTo(Pair arg0) {
			if (arg0.x != x)
				return x - arg0.x;
			return y - arg0.y;
		}

		@Override
		public String toString() {
			return "(" + x + ',' + y + ')';
		}
	}

	class Triple implements Comparable<Triple> {
		public int x;
		public int y;
		public int z;

		Triple(int a, int b, int c) {
			x = a;
			y = b;
			z = c;
		}

		@Override
		public int compareTo(Triple arg0) {
			if (arg0.x != x)
				return x - arg0.x;
			return y - arg0.y;
		}

		@Override
		public String toString() {
			return "(" + x + ',' + y + ',' + z + ')';
		}
	}

	class Debug {
		private boolean allowDebug;

		public Debug(boolean allowDebug) {
			this.allowDebug = allowDebug;
		}

		private void outputName(String name) {
			System.out.print(name + " = ");
		}

		public void debug(String name, Object... x) throws IllegalArgumentException, IllegalAccessException {
			outputName(name);
			debug2(name, x);
			if (x.length == 1)
				System.out.println();
		}

		public void debug2(String name, Object... x) throws IllegalArgumentException, IllegalAccessException {
			if (!allowDebug) {
				return;
			}
			if (x.length == 1) {
				Object y = x[0];
				if (y instanceof Collection<?>) {
					System.out.println("here");
					ts((Iterable<Object>) y);
				} else if (y.getClass().isArray()) {
					if(y instanceof int[]) {
						System.out.print(Arrays.toString((int[]) y));
					}else if(y instanceof long[]) {
						System.out.print(Arrays.toString((long[]) y));
					}else if(y instanceof char[]) {
						System.out.print(Arrays.toString((char[]) y));
					}else if(y instanceof double[]) {
						System.out.print(Arrays.toString((double[]) y));
					}else if(y instanceof boolean[]) {
						System.out.print(Arrays.toString((boolean[]) y));
					}
					try {
//						return ts((Object[]) y);
					}catch(ClassCastException e1) {
//						return y.toString();
					}
				} else {
					System.out.print(y);
				}
			} else {
				System.out.print("[");
				for (int i = 0; i < x.length; i++) {
					if(i!=0)System.out.print(", ");
					this.debug2(name, x[i]);
				}
				System.out.println("]");
			}

		}

		void ts(Iterable<Object> iter) throws IllegalArgumentException, IllegalAccessException {
//			System.out.println("ITERABLE");
			System.out.print("[");
			boolean first = true;
			for (Object t : iter) {
				if (!first) {
					System.out.print(",");
				}
				first = false;
				debug2("name", t);
			}
			System.out.print("]");
		}
		
		void tmp(Object[] y) throws IllegalArgumentException, IllegalAccessException {
			System.out.print("[");
			boolean first = true;
			for (Object t : y) {
				if (!first) {
					System.out.print(",");
				}
				first = false;
				debug2("name", t);
			}
			System.out.print("]");
		}
	}
}