#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=9999999999999999; int main(){ ll n,k; cin >> n >> k; vectora(n); for (ll i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(),a.end()); mapmemo; vector>dp(n+1); for (ll i = 0; i < n; i++) { dp[i+1]=dp[i]; dp[i+1][a[i]]=1; for(auto v:dp[i]){ dp[i+1][v.first-a[i]]=1; dp[i+1][a[i]-v.first]=1; } if (dp[i+1][k]>=1) { cout << "Yes" << endl; return 0; } } if (dp[n][k]>=1) { cout << "Yes" << endl; }else{ cout << "No" << endl; } }