#include <bits/stdc++.h>
using namespace std;
const int W = 2e5 + 1;
int cnt[W];
int n, w;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n >> w;
for (int i = 0; i < n; ++i) {
int x;
cin >> x;
++cnt[x];
}
for (int i = 1; i <= w; ++i) {
auto carry = (cnt[i] - 1) / 2;
if (carry) {
cnt[2 * i] += carry;
cnt[i] -= 2 * carry;
}
}
bitset<W> knapsack = 1;
for (int i = 1; i <= w; ++i)
for (int j = 0; j < cnt[i]; ++j)
knapsack |= knapsack << i;
cout << (knapsack.test(w) ? "YES" : "NO");
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgVyA9IDJlNSArIDE7CmludCBjbnRbV107CmludCBuLCB3OwogCmludCBtYWluKCkKewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKDApOwogICAgY2luID4+IG4gPj4gdzsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgaW50IHg7CiAgICAgICAgY2luID4+IHg7CiAgICAgICAgKytjbnRbeF07CiAgICB9CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSB3OyArK2kpIHsKICAgICAgICBhdXRvIGNhcnJ5ID0gKGNudFtpXSAtIDEpIC8gMjsKICAgICAgICBpZiAoY2FycnkpIHsKICAgICAgICAgICAgY250WzIgKiBpXSArPSBjYXJyeTsKICAgICAgICAgICAgY250W2ldIC09IDIgKiBjYXJyeTsKICAgICAgICB9CiAgICB9CiAgICBiaXRzZXQ8Vz4ga25hcHNhY2sgPSAxOwogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gdzsgKytpKQogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgY250W2ldOyArK2opCiAgICAgICAgICAgIGtuYXBzYWNrIHw9IGtuYXBzYWNrIDw8IGk7CiAgICBjb3V0IDw8IChrbmFwc2Fjay50ZXN0KHcpID8gIllFUyIgOiAiTk8iKTsKfQ==