import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Ribhav
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        E1TreesAndQueries solver = new E1TreesAndQueries();
        solver.solve(1, in, out);
        out.close();
    }

    static class E1TreesAndQueries {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int n = s.nextInt();
            int[] from = new int[n - 1], to = new int[n - 1];
            for (int i = 0; i < n - 1; i++) {
                from[i] = s.nextInt() - 1;
                to[i] = s.nextInt() - 1;
            }
            int[][] mat1 = func(n, from, to);

            int[][] upper = upper(mat1, 0);
            int[] par = upper[0], depth = upper[2];

            int[][] sparse = logstepParents(par);

            int q = s.nextInt();
            while (q-- > 0) {
                int x = s.nextInt() - 1, y = s.nextInt() - 1;
                int a = s.nextInt() - 1, b = s.nextInt() - 1;
                int k = s.nextInt();

                int lcaAB = lca(a, b, sparse, depth);
                int disAB = depth[a] + depth[b] - 2 * depth[lcaAB];

                if (k >= disAB && k % 2 == disAB % 2) {
                    out.println("YES");
                    continue;
                }

                int lcaXY = lca(x, y, sparse, depth);
                int disXY = depth[x] + depth[y] - 2 * depth[lcaXY];

                int lcaAX = lca(a, x, sparse, depth);
                int lcaAY = lca(a, y, sparse, depth);

                int lcaBX = lca(b, x, sparse, depth);
                int lcaBY = lca(b, y, sparse, depth);

                int dAX = depth[a] + depth[x] - 2 * depth[lcaAX];
                int dAY = depth[a] + depth[y] - 2 * depth[lcaAY];
                int dBX = depth[b] + depth[x] - 2 * depth[lcaBX];
                int dBY = depth[b] + depth[y] - 2 * depth[lcaBY];

                int dAB = Math.min(dAX + dBY, dAY + dBX) + 1;

                if (k >= dAB && k % 2 == dAB % 2) {
                    out.println("YES");
                    continue;
                } else {
                    out.println("NO");
                }
            }
        }

        int lca(int a, int b, int[][] sparse, int[] depth) {
            if (depth[a] < depth[b]) {
                b = ancestor(b, depth[b] - depth[a], sparse);
            } else if (depth[a] > depth[b]) {
                a = ancestor(a, depth[a] - depth[b], sparse);
            }
            if (a == b) {
                return a;
            }
            int sa = a, sb = b;
            for (int low = 0, high = depth[a], t = Integer.highestOneBit(high), k = Integer
                    .numberOfTrailingZeros(t); t > 0; t >>>= 1, k--) {
                if ((low ^ high) >= t) {
                    if (sparse[k][sa] != sparse[k][sb]) {
                        low |= t;
                        sa = sparse[k][sa];
                        sb = sparse[k][sb];
                    } else {
                        high = low | t - 1;
                    }
                }
            }
            return sparse[0][sa];
        }

        int ancestor(int u, int dep, int[][] sparse) {
            for (int i = 0; dep > 0 && u != -1; dep >>>= 1, i++) {
                if ((dep & 1) == 1)
                    u = sparse[i][u];
            }
            return u;
        }

        int[][] logstepParents(int[] parent) {
            int n = parent.length;
            int m = Integer.numberOfTrailingZeros(Integer.highestOneBit(n - 1)) + 1;
            int[][] sparse = new int[m][n];
            sparse[0] = parent;
            for (int j = 1; j < m; j++) {
                for (int i = 0; i < n; i++) {
                    sparse[j][i] = sparse[j - 1][i] == -1 ? -1 : sparse[j - 1][sparse[j - 1][i]];
                }
            }
            return sparse;
        }

        int[][] upper(int[][] g, int root) {
            int n = g.length;
            int[] par = new int[n];
            Arrays.fill(par, -1);

            int[] depth = new int[n];
            depth[0] = 0;

            int[] q = new int[n];
            q[0] = root;
            for (int p = 0, r = 1; p < r; p++) {
                int cur = q[p];
                for (int nex : g[cur]) {
                    if (par[cur] != nex) {
                        q[r++] = nex;
                        par[nex] = cur;
                        depth[nex] = depth[cur] + 1;
                    }
                }
            }
            return new int[][]{par, q, depth};
        }

        int[][] func(int n, int[] from, int[] to) {
            int[][] g = new int[n][];
            int[] p = new int[n];
            for (int f : from)
                p[f]++;
            for (int t : to)
                p[t]++;
            for (int i = 0; i < n; i++)
                g[i] = new int[p[i]];
            for (int i = 0; i < from.length; i++) {
                g[from[i]][--p[from[i]]] = to[i];
                g[to[i]][--p[to[i]]] = from[i];
            }
            return g;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

