#include #include using namespace std; using LL = long long; using P = pair; using Graph = vector>; const int INF = 1 << 29; const long long LINF = 1LL << 60; #define all(x) (x).begin(), (x).end() #define rep(i,n) for(int i = 0; i < (n); ++i) templatevoid chmin(T&a, T b){if(a > b) a = b;} templatevoid chmax(T&a, T b){if(a < b) a = b;} int main(){ //データの入力 int N, K; cin >> N >> K; //xorの累積和の作成 vector xor_sum(N+1,0); for(int i = 0; i < N; ++i){ int A; cin >> A; xor_sum[i+1] = xor_sum[i] ^ A; } //全探索で探す for(int i = 1; i <= N; ++i){ for(int j = 0; j < i; ++j){ int tmp = xor_sum[i] ^ xor_sum[j]; if(tmp == K){ cout << "Yes" << endl; return 0; } } } cout << "No" << endl; }