Problem:
Score : 900 points

Problem Statement

Alice lives on a line. Today, she will travel to some place in a mysterious vehicle.
Initially, the distance between Alice and her destination is D. When she input a number x to the vehicle, it will travel in the direction of the destination by a distance of x if this move would shorten the distance between the vehicle and the destination, and it will stay at its position otherwise. Note that the vehicle may go past the destination when the distance between the vehicle and the destination is less than x.

Alice made a list of N numbers. The i-th number in this list is d_i. She will insert these numbers to the vehicle one by one.

However, a mischievous witch appeared. She is thinking of rewriting one number in the list so that Alice will not reach the destination after N moves.

She has Q plans to do this, as follows:

Rewrite only the q_i-th number in the list with some integer so that Alice will not reach the destination.

Write a program to determine whether each plan is feasible.

Constraints

1≤ N ≤ 5*10^5

1≤ Q ≤ 5*10^5

1≤ D ≤ 10^9

1≤ d_i ≤ 10^9(1≤i≤N)

1≤ q_i ≤ N(1≤i≤Q)

D and each d_i are integers.

Input

Input is given from Standard Input in the following format:

N D
d_1 d_2 ... d_N
Q
q_1 q_2 ... q_Q

Output

Print Q lines. The i-th line should contain YES if the i-th plan is feasible, and NO otherwise.

Sample Input 1

4 10
3 4 3 3
2
4 3

Sample Output 1

NO
YES

For the first plan, Alice will already arrive at the destination by the first three moves, and therefore the answer is NO.
For the second plan, rewriting the third number in the list with 5 will prevent Alice from reaching the destination as shown in the following figure, and thus the answer is YES.

Sample Input 2

5 9
4 4 2 3 2
5
1 4 2 3 5

Sample Output 2

YES
YES
YES
YES
YES

Alice will not reach the destination as it is, and therefore all the plans are feasible.

Sample Input 3

6 15
4 3 5 4 2 1
6
1 2 3 4 5 6

Sample Output 3

NO
NO
YES
NO
NO
YES

Solution in Rust (1.15.1) (judge verdict: Wrong Answer)

use std::io;
use std::io::{Read, BufReader};
use std::cmp;

fn next_token<R: Read>(reader: &mut R) -> Vec<u8> {
    let mut buf: [u8; 1] = [0];
    let mut read_chars = false;
    let mut ret: Vec<u8> = vec![];

    loop {
        if reader.read(&mut buf).unwrap() == 0 {
            break;
        } else {
            if buf[0] == '\r' as u8 || buf[0] == '\n' as u8 || buf[0] == ' ' as u8 {
                if read_chars {
                    break;
                }
            } else {
                read_chars = true;
                ret.push(buf[0]);
            }
        }
    };
    ret
}
fn next_i64<R: Read>(reader: &mut R) -> i64 {
    let token = next_token(reader);
    let mut ret: i64 = 0;
    let mut sgn = false;

    for c in token {
        if '0' as u8 <= c && c <= '9' as u8 {
            ret = ret * 10 + (c - ('0' as u8)) as i64;
        } else if '-' as u8 == c {
            sgn = true;
        }
    };
    ret * if sgn { -1 } else { 1 }
}
fn next_i32<R: Read>(reader: &mut R) -> i32 {
    next_i64(reader) as i32
}
fn abs(t: i32) -> i32 {
    if t > 0 {
        t
    } else {
        -t
    }
}
fn apply(x: i32, mv: i32) -> i32 {
    cmp::min(x, cmp::max(x - mv, mv / 2))
}
fn main() {
    let buf = &mut BufReader::new(io::stdin());

    let n = next_i32(buf);
    let d = next_i32(buf);
    let mut di = vec![];

    for _ in 0..n {
        di.push(next_i32(buf));
    }

    let mut ans = vec![false; n as usize];
    let mut bnd = vec![0 as i32; (n+1) as usize];
    bnd[n as usize] = 0;
    let mut i = n - 1;
    while i >= 0 {
        let mut lo = 0;
        let mut hi = 1001001001;
        while lo < hi {
            let mid = (lo + hi + 1) / 2;
            let dd = apply(mid, di[i as usize]);

            if dd <= bnd[(i + 1) as usize] {
                lo = mid
            } else {
                hi = mid - 1
            }
        }
        bnd[i as usize] = lo;
        i -= 1;
    }
    let mut curd = d;
    for i in 0..n {
        ans[i as usize] = curd > bnd[(i + 1) as usize];
        curd = cmp::max(0, abs(curd - di[i as usize]));
    }

    let q = next_i32(buf);
    for _ in 0..q {
        let qi = next_i32(buf);
        println!("{}", if ans[(qi - 1) as usize] { "YES" } else { "NO" } );
    }
}