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 C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <bits/stdc++.h>
using namespace std;

typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
#define MP make_pair
#define PB push_back
#define X first
#define Y second

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for(int i = (b) - 1; i >= (a); --i)
#define ALL(a) a.begin(), a.end()
#define SZ(a) (int)((a).size())
#define FILL(a, value) memset(a, value, sizeof(a))
#define debug(a) cerr << #a << " = " << a << endl;

const double PI = acos(-1.0);
const LL INF = 1e9 + 47;
const LL LINF = INF * INF;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 1 << 19;
int n, q, d;
int a[N];
bool ans[N];
int enter[N];
set<int> can[N];
int min_cant[N];

void onowy(int& x, int y)
{
	x = min(x, y);
}

int main()
{
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	
	cin >> n >> d;
	FOR(i, 0, n) cin >> a[i];
	
	enter[0] = d;
	FOR(i, 1, n)
	{
		enter[i] = enter[i - 1];
		if (abs(enter[i] - a[i - 1]) < enter[i])
			enter[i] = abs(enter[i] - a[i - 1]);
	}
	
	min_cant[n] = 1;
	RFOR(i, n, 0)
	{
		if (min_cant[i + 1] < a[i]) 
		{
			min_cant[i] = min_cant[i + 1];
			continue;
		}
		
		min_cant[i] = min_cant[i + 1] + a[i];		
	}

	FOR(i, 0, n) 
		ans[i] = enter[i] >= min_cant[i + 1];
	
	cin >> q;
	while(q--)
	{
		int x;
		cin >> x;
		cout << (ans[x - 1] ? "YES\n" : "NO\n");
	}
	
	cerr << "Time elapsed: " << clock() / (double)CLOCKS_PER_SEC << endl;
	return 0;
}