#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace atcoder; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n) - 1; i >= 0; i--) #define repk(i, k, n) for (int i = k; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define mod1 1000000007 #define mod2 998244353 #define mod3 100000007 #define vi vector #define vs vector #define vc vector #define vl vector #define vb vector #define vvi vector> #define vvc vector> #define vvl vector> #define vvb vector> #define vvvi vector>> #define vvvl vector>> #define pii pair #define pil pair #define pli pair #define pll pair #define vpii vector> #define vpll vector> #define vvpii vector>> #define vvpll vector>> template void debug(T e) { cerr << e << endl; } template void debug(vector &v) { rep(i, v.size()) { cerr << v[i] << " "; } cerr << endl; } template void debug(vector> &v) { rep(i, v.size()) { rep(j, v[i].size()) { cerr << v[i][j] << " "; } cerr << endl; } } template void debug(vector> &v) { rep(i, v.size()) { cerr << v[i].first << " " << v[i].second << endl; } } template void debug(set &st) { for (auto itr = st.begin(); itr != st.end(); itr++) { cerr << *itr << " "; } cerr << endl; } template void debug(multiset &ms) { for (auto itr = ms.begin(); itr != ms.end(); itr++) { cerr << *itr << " "; } cerr << endl; } template void debug(map &mp) { for (auto itr = mp.begin(); itr != mp.end(); itr++) { cerr << itr->first << " " << itr->second << endl; } } void debug_out() { cerr << endl; } template void debug_out(Head H, Tail... T) { cerr << H << " "; debug_out(T...); } using mint = modint998244353; void debug_mint1(vector &vec) { for (int i = 0; i < vec.size(); i++) { cerr << vec[i].val() << " "; } cerr << endl; } void debug_mint2(vector> &vec) { for (int i = 0; i < vec.size(); i++) { for (int j = 0; j < vec[i].size(); j++) { cerr << vec[i][j].val() << " "; } cerr << endl; } } ll partite(vector &ans, ll H, ll W, multiset> &st_x, multiset> &st_y){ ll now_x = 0; ll now_y = 0; while (st_x.size()){ auto itx = st_x.end(); itx--; auto ity = st_y.end(); ity--; ll max_x = (*itx).first.first; ll then_y = (*itx).first.second; ll then_idx = (*itx).second; ll max_y = (*ity).first.first; ll then_x = (*ity).first.second; ll then_idy = (*ity).second; if (max_x == H - now_x){ ans[then_idx] = make_pair(now_x + 1, now_y + 1); now_y += then_y; st_x.erase(st_x.find(make_pair(make_pair(max_x, then_y), then_idx))); st_y.erase(st_y.find(make_pair(make_pair(then_y, max_x), then_idx))); } else if (max_y == W - now_y){ ans[then_idy] = make_pair(now_x + 1, now_y + 1); now_x += then_x; st_x.erase(st_x.find(make_pair(make_pair(then_x, max_y), then_idy))); st_y.erase(st_y.find(make_pair(make_pair(max_y, then_x), then_idy))); } else{ return -1; } } return 0; } int main() { ll N, K; cin >> N >> K; vector A(N); rep(i, N){ cin >> A[i]; } for (ll i = 0; i < (1 << N); i++){ ll popcnt = 0; ll sums = 0; rep(j, N){ if ((i >> j) & 1){ popcnt++; sums += A[j]; } } if (popcnt >= 1 && popcnt <= N - 1 && sums == K){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; }