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

public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    List<Integer>[] tree;
    int[][] father;
    int[] depth;
    int maxj=17;
    public static void main(String[] args) throws IOException {
        Main main = new Main();
        main.solve();
        out.flush();
    }
    void solve() throws IOException{
        String[] buf = reader.readLine().split(" ");
        int n = Integer.parseInt(buf[0]);
        tree = new List[n];
        for(int i=0;i<n;i++) tree[i] = new LinkedList<>();
        for(int i=0;i<n-1;i++){
            buf = reader.readLine().split(" ");
            int u = Integer.parseInt(buf[0])-1, v = Integer.parseInt(buf[1])-1;
            tree[u].add(v);tree[v].add(u);
        }
        depth = new int[n];
        father = new int[n][maxj+1];
        // father[i][0] is the 2^0-th father of i, that is, the 1-st and direct father of i
        dfs(0,0,0);
        buf = reader.readLine().split(" ");
        int q = Integer.parseInt(buf[0]);
        int[] para = new int[10];
        while(q-->0){
            buf = reader.readLine().split(" ");
            for(int j=0;j<5;j++) para[j] = Integer.parseInt(buf[j]);
//            int x = sc.nextInt()-1, y = sc.nextInt()-1, a = sc.nextInt()-1, b = sc.nextInt()-1, k = sc.nextInt();
            String ans = helper(para[0]-1,para[1]-1,para[2]-1,para[3]-1,para[4]);
            out.println(ans);
        }
    }
    String helper(int x, int y, int a, int b, int k){
        int ab = dist(a,b);
        if(ab<=k&&ab%2==k%2) return "YES";
        // then try to use the x-y edge
        int axyb = dist(a,x)+dist(y,b)+1;
        if(axyb<=k&&axyb%2==k%2) return "YES";
        int ayxb = dist(a,y)+dist(x,b)+1;
        if(ayxb<=k&&ayxb%2==k%2) return "YES";
        return "NO";
    }
    int dist(int a, int b){
        int mid = get_lca(a,b);
        return depth[a]+depth[b]-2*depth[mid];
    }
    void dfs(int cur, int from, int level){
        father[cur][0] = from;
        for(int i=1;i<=maxj;i++){
            father[cur][i] = father[father[cur][i-1]][i-1];
        }
        depth[cur] = level;
        for(int to:tree[cur]){
            if(to!=from) dfs(to,cur,level+1);
        }
    }
    int get_lca(int u, int v){
        if(depth[u]<depth[v]){ // let u be the deeper one
            int mid = u; u = v; v = mid;
        }
        u = lift(u,depth[u]-depth[v]);
        // now u and v are same depth
        if(u==v) return u;
        for(int j=maxj;j>=0;j--){ // here it has to be j from big to small
            if(father[u][j]!=father[v][j]){
                u = father[u][j];
                v = father[v][j];
            }
        }
        return father[u][0];
        // at last u and v have the same father for level 1
    }
    int lift(int u, int d){
        if(d==0) return u;
        for(int i=maxj;i>=0;i--){
            if(((1<<i)&d)>0) u = father[u][i];
        }
        return u;
    }
}

