import java.io.*;
import java.util.*;


public class tree1 {


    public static void main(String[] args) throws Exception {
        R in = new R();
        int vertices = in.nextInt();
        ArrayList<ArrayList<Integer>> connections = new ArrayList<>();
        for (int i = 0; i < vertices; i++) {
            connections.add(new ArrayList<>());
        }
        for (int i = 0; i < vertices - 1; i++) {
            int u = in.nextInt()-1;
            int v = in.nextInt()-1;
            connections.get(u).add(v);
            connections.get(v).add(u);
        }
        // bfs first

        int[] levels = new int[vertices];
        int[] parent = new int[vertices];

        getLevelsAndParent(levels,parent,connections);

        int[][] ancestorData = logAncestor(parent, levels, vertices);

        int q = in.nextInt();
        StringBuilder print = new StringBuilder();

        for (int i = 0; i < q; i++) {
            int x = in.nextInt()-1;
            int y = in.nextInt()-1;
            int a = in.nextInt()-1;
            int b = in.nextInt()-1;
            int k = in.nextInt();

            int distOriginal = distLCA(a,b,ancestorData,levels);
            int distWithPath = Math.min(
                distLCA(a,x,ancestorData,levels) + 1 + distLCA(y,b,ancestorData,levels),
                distLCA(a,y,ancestorData,levels) + 1 + distLCA(x,b,ancestorData,levels)
            );
            if ((distOriginal%2 == k%2 && distOriginal <= k)
                || distWithPath%2 == k%2 && distWithPath <= k) {
                print.append("YES");
            } else {
                print.append("NO");
            }
            print.append('\n');
        }
        System.out.print(print);
        System.out.flush();
    }

        /*
        boolean[] parity = new boolean[vertices]; // false=0, true=1

        HashSet<Integer> pastNodes = new HashSet<>();
        HashSet<Integer> nodes = new HashSet<>();
        nodes.add(0);

        // already false


        boolean currentParity = false;
        while (!nodes.isEmpty()) {
            HashSet<Integer> futureNodes = new HashSet<>();
            for (int x : nodes) {
                parity[x]=currentParity;
                futureNodes.addAll(connections.get(x));
            }
            futureNodes.removeAll(pastNodes);

            currentParity = !currentParity;
            pastNodes=nodes;
            nodes=futureNodes;
        }*/

    public static void getLevelsAndParent(int[] levels, int[] parent, ArrayList<ArrayList<Integer>> connections) {
        HashSet<Integer> nodes = new HashSet<>();
        nodes.add(0);

        for (int currentLevel = 0; !nodes.isEmpty(); currentLevel++) {
            HashSet<Integer> futureNodes = new HashSet<>();
            for (int x : nodes) {
                levels[x]=currentLevel;
                for (int node : connections.get(x)) {
                    if (node != parent[x]) {
                        futureNodes.add(node);
                        parent[node]=x;
                    }
                }
            }
            nodes=futureNodes;
        }
    }




    /**
     * See Lib.java
     */
    public static int floor_log2(int x) {
        int result = -1;
        for (;x != 0; x>>=1) result++;
        return result; // floor_log2(0) = -1
    }

    /**
     * LCA Algorithm
     * https://www.topcoder.com/community/competitive-programming/tutorials/range-minimum-query-and-lowest-common-ancestor/
     */
    public static int[][] logAncestor(int[] parent, int[] level, int vertices) {
        int[][] ancestors = new int[vertices][];
        for (int i = 0; i < vertices; i++) {
            ancestors[i] = new int[floor_log2(level[i]) + 1];
            if (ancestors[i].length != 0) ancestors[i][0]=parent[i];
            for (int j = 1; j < ancestors[i].length; j++) {
                ancestors[i][j]=-1;
            }
        }

        for (int j = 1; (1 << j) < vertices; j++) {
            for (int i = 0; i < vertices; i++) {
                if (j < ancestors[i].length && ancestors[i][j-1] != -1) {
                    ancestors[i][j] = ancestors[ancestors[i][j-1]][j-1];
                }
            }
        }
        return ancestors;
    }


    public static int distLCA(int p, int q, int[][] logAncestor, int[] level) {
        int tmp;
        if (level[p] < level[q]) {
            tmp=p;
            p=q;
            q=tmp;
        }
        int result = 0;

        int log = floor_log2(level[p]);
        for (int i = log; i >= 0; i--) {
            if (level[p] - (1<<i) >= level[q]) {
                p = logAncestor[p][i];
                result += 1<<i;
            }
        }
        if (p==q) {
            return result;
        }

        for (int i = log; i >= 0; i--) {
            if (i < logAncestor[p].length && logAncestor[p][i] != logAncestor[q][i]) {
                p = logAncestor[p][i];
                q = logAncestor[q][i];
                result += 2<<i;
            }
        }
        return result + 2; // have same parent
    }

    //<editor-fold desc="R">

    /**
     * This class is for fast input. Please ignore.
     */
    public static class R {
        private BufferedReader br;
        /**
         * Should be set to null at end of line
         */
        private StringTokenizer st;

        public R() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public R(String filename) throws IOException {
            br = new BufferedReader(new FileReader(filename + ".in"));
        }

        public R(BufferedReader reader) {
            br = reader;
        }

        public BufferedReader getReader() {
            return br;
        }

        public StringTokenizer getStringTokenizer() {
            return st;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

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

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

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

        /**
         * Note:
         * CAN MODIFY the BufferedReader's location and the string tokenizer!!!
         * Recommended to only use with next().
         */
        public boolean lineHasNext() throws IOException {
            if (st == null) {
                String s = br.readLine();
                if (s == null) return false;
                st = new StringTokenizer(s);
            }
            return st.hasMoreTokens();
        }

        /**
         * Note:
         * CAN MODIFY the BufferedReader's location and the string tokenizer!!!
         * Recommended to only use with next().
         */
        public boolean hasNext() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        /**
         * Skips a line. Sets st to null if has tokens left, and otherwise
         * reads a line.
         */
        public void skipLine() throws IOException {
            if (st == null || !st.hasMoreTokens()) {
                br.readLine(); // Otherwise, would do nothing.
            }
            st = null;
        }

        /**
         * This will set st to null, and this ignores current line
         */
        public String[] nextLine() throws IOException {
            String s = br.readLine();
            if (s == null) return null;
            st = new StringTokenizer(s);
            ArrayList<String> result = new ArrayList<>();
            while (st.hasMoreTokens()) {
                result.add(st.nextToken());
            }
            st = null;
            return result.toArray(new String[0]);
        }

        /**
         * sets st to null!
         */
        public String[] nextTower(int lines) throws IOException {
            String[] tower = new String[lines];
            st = null;
            for (int i = 0; i < lines; i++) {
                tower[i] = br.readLine();
            }
            return tower;
        }

        public int[] nextIntLine() throws IOException {
            return intArr(nextLine());
        }

        public long[] nextLongLine() throws IOException {
            return longArr(nextLine());
        }

        public int[] nextIntTower(int lines) throws IOException {
            return intArr(nextTower(lines));
        }

        public long[] nextLongTower(int lines) throws IOException {
            return longArr(nextTower(lines));
        }

        public int[] intArr(String[] strings) throws IOException {
            int[] ints = new int[strings.length];
            int i = 0;
            for (String s : strings) {
                ints[i] = Integer.parseInt(s);
                i++;
            }
            return ints;
        }

        public long[] longArr(String[] strings) throws IOException {
            long[] longs = new long[strings.length];
            int i = 0;
            for (String s : strings) {
                longs[i] = Long.parseLong(s);
                i++;
            }
            return longs;
        }

        public double[] doubleArr(String[] strings) {
            double[] doubles = new double[strings.length];
            int i = 0;
            for (String s : strings) {
                doubles[i] = Double.parseDouble(s);
                i++;
            }
            return doubles;
        }

        /**
         * This will set st to null
         */
        public char[] nextCharArray() throws IOException {
            st = null;
            String s = br.readLine();
            return s == null ? null : s.toCharArray();
        }

        /**
         * This will set st to null
         * Boolean at pos i true if char at pos i == c
         */
        public boolean[] nextBoolArray(char c) throws IOException {
            char[] chars = nextCharArray();
            if (chars == null) return null;
            boolean[] booleans = new boolean[chars.length];
            for (int i = 0; i < chars.length; i++) {
                booleans[i] = chars[i] == c;
            }
            return booleans;
        }

        public int[][] next2Dint(int lines) throws IOException {
            int[][] result = new int[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextIntLine();
            }
            return result;
        }

        public long[][] next2Dlong(int lines) throws IOException {
            long[][] result = new long[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextLongLine();
            }
            return result;
        }

        public char[][] next2Dchar(int lines) throws IOException {
            char[][] result = new char[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextCharArray();
            }
            return result;
        }

        public boolean[][] next2Dbool(int lines, char c) throws IOException {
            boolean[][] result = new boolean[lines][];
            for (int i = 0; i < lines; i++) {
                result[i] = nextBoolArray(c);
            }
            return result;
        }
    }
    //</editor-fold>
}