#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <random>
#include <unordered_map>
#include <unordered_set>
#define all(a) a.begin(),a.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pb push_back
#define debug(x) cerr << __LINE__ << ' ' << #x << ':' << (x) << '\n'
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef complex<ld> com;
template<class T> using prique = priority_queue<T, vector<T>, greater<T>>;
constexpr int inf = 1000000010;
constexpr ll INF = 1000000000000000010;
constexpr int mod1e9 = 1000000007;
constexpr int mod998 = 998244353;
constexpr ld eps = 1e-12;
constexpr ld pi = 3.141592653589793238;
constexpr ll ten(int n) { return n ? 10 * ten(n - 1) : 1; };
int dx[] = { 1,0,-1,0,1,1,-1,-1 }; int dy[] = { 0,1,0,-1,1,-1,1,-1 };
void fail() { cout << "-1\n"; exit(0); } void no() { cout << "No\n"; exit(0); }
template<class T, class U> inline bool chmax(T &a, const U &b) { if (a < b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmin(T &a, const U &b) { if (a > b) { a = b; return true; } return false; }
template<class T> istream &operator >> (istream &s, vector<T> &v) { for (auto &e : v) s >> e; return s; }
template<class T> ostream &operator << (ostream &s, const vector<T> &v) { for (auto &e : v) s << e << ' '; return s; }

struct fastio {
	fastio() {
		cin.tie(0); cout.tie(0);
		ios::sync_with_stdio(false);
		cout << fixed << setprecision(20);
		cerr << fixed << setprecision(20);
	}
}fastio_;

int main() {
	vector<int> a(4);
	cin >> a;
	int s = accumulate(all(a), 0);
	rep(i, 16) {
		int k = 0;
		rep(j, 4) {
			if (i >> j & 1) k += a[j];
		}
		if (k * 2 == s) {
			cout << "Yes\n";
			return 0;
		}
	}
	cout << "No\n";
}
// Author:  param3435
#include <bits/stdc++.h>
#pragma GCC optimize ("-O2")
using namespace std;

#define LL                       long long
#define LD                       long double
#define divisor                  1000000007
#define INFP                     LLONG_MAX
#define INFN                     LLONG_MIN
#define pb                       push_back
#define pf                       push_front
#define pob                      pop_back
#define pof                      pop_front
#define mp                       make_pair
#define pLL                      pair<LL, LL>
#define loop(i,a,b)              for(LL i = a; i < b; i++)
#define loopd(i,a,b)             for(LL i = a; i > b; i--)
#define numberOfOnes(n)          __builtin_popcountll(n)
#define parity(n)                __builtin_parityll(n)                                  // = 1  when numberOfOnes(n) is odd
#define leadingZeros(n)          __builtin_clzll(n)
#define trailingZeros(n)         __builtin_ctzll(n)
#define gcd(first, second)       __gcd(first, second)
#define debug(x)                 cout << #x << " = " << x << '\n'
#define all(x)                   (x).begin(), (x).end()
#define sz(x)                    (LL)(x).size()
#define sum(x)                   (accumulate((x).begin(), (x).end(), 0LL))
#define minE(x)                  (*min_element((x).begin(), (x).end()))
#define maxE(x)                  (*max_element((x).begin(), (x).end()))
#define minI(x)                  ( min_element((x).begin(), (x).end()) - (x).begin())
#define maxI(x)                  ( max_element((x).begin(), (x).end()) - (x).begin())
#define lB(x, y)                 ( lower_bound((x).begin(), (x).end(), (y)) - (x).begin())
#define uB(x, y)                 ( upper_bound((x).begin(), (x).end(), (y)) - (x).begin())
#define FastIO                   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

template<typename T>             istream& operator>>(istream& is,  vector<T> &v) {for (auto& i : v) is >> i;        return is;}
template<typename T>             ostream& operator<<(ostream& os,  vector<T>  v) {for (auto& i : v) os << i << ' '; return os;}
template<typename T, typename U> istream& operator>>(istream& is, pair<T, U> &p) {is >> p.first >> p.second;        return is;}
template<typename T, typename U> ostream& operator<<(ostream& os, pair<T, U>  p) {os << p.first << ' ' << p.second; return os;}

bool sortbysec(const tuple<int, int, int>& a, const tuple<int, int, int>& b) {
	return (get<1>(a) < get<1>(b));
}

void solve() {
	LL N, Q, num = 1;
	cin >> N >> Q;
	vector<LL>A(N);
	vector<tuple<LL, LL, LL>> K;
	cin >> A;
	loop(i, 0, Q) {
		cin >> num;
		K.pb({num, i, 0});
	}
	sort(all(A));
	sort(all(K));
	/*loop(i, 0, Q) {
		cout << get<0>(K[i]) << ' ' << get<1>(K[i]) << ' ' << get<2>(K[i]) << '\n';
	}*/
	LL j = 0, c = get<0>(K[0]), r = 0;
	loop(i, 0, N) {
beg:
		if (c < A[i]) {
			get<2>(K[j]) = c;
			j++;
			if (j == Q) {
				break;
			}
			c = i  + get<0>(K[j]);
			goto beg;
		}
		else if (i == N - 1) {
			for (; j < Q; j++) {
				get<2>(K[j]) = N + get<0>(K[j]);
			}
			break;
		}
		else
			c++;

	}
	sort(K.begin(), K.end(), sortbysec);
	/*loop(i, 0, Q) {
		cout << get<0>(K[i]) << ' ' << get<1>(K[i]) << ' ' << get<2>(K[i]) << '\n';
	}*/
	loop(i, 0, Q) {
		cout << get<2>(K[i]) << '\n';
	}
	return;
}

int main() {

	FastIO;
	LL T = 1;
	// cin >> T;
	loop(i, 0, T - 1) {
		solve();
		cout << '\n';
	}
	solve();
	return 0;
}