#include<iostream>
#include<algorithm>
#include<map>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<queue>
#include<vector>
#include<set>
#define ll long long
#define pb push_back
#define forn(i,x,n) for(int i=x;i<=n;++i)
#define forr(i,x,n) for(int i=n;i>=x;--i)
#define lson (rt<< 1)
#define rson (rt<< 1 | 1)
#define gmid ((l+r)>> 1 )
using namespace std;

const int maxn=20000050;
int a[maxn];
int main()
{
	int n;
	cin>>n;
	forn(i,1,n)
	  cin>>a[i]; 
	sort(a+1,a+n+1);
	bool f=true;
	forn(i,1,n)
	  if(a[i]==a[i-1]||a[i]<1||a[i]>n)
	    f=false;
	if(f) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;	  
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define Vi vector<int>
#define for_(i, a, b) for(int i = (a);i < (b);++i)
#define ford_(i, a, b) for(int i = (b)-1;i >= (a);--i)
#define rep(i, n) for_(i, 0, n)
#define repd(i, n) rfor_(i, 0, n)

int main(){
  int N,Q;
  cin >> N >> Q;
  
  vector<ll> A(N);
  rep(i,N){
    cin >> A.at(i);
  }
  vector<ll> low(N); //C
  rep(i,N){
    low.at(i) = A.at(i) - (i+1);
  }
  
  while(Q--){
    ll K;
    cin >> K;
    const int idx = lower_bound(low.begin(), low.end(), K) - low.begin();
    if(idx == N){
      cout << A[N-1] + (K - low[N-1]) << '\n';
    } else {
      cout << A[idx] - (low[idx] - K+1) << '\n';
    }
  }
  
}