#include "bits/stdc++.h" #include #include #include "atcoder/all" #include #include using namespace boost::multiprecision; using namespace std; using namespace atcoder; using ll = long long; using ull = unsigned long long; using mint = modint998244353; using mint2 = modint1000000007; const double eps = 1e-9; #define REP(i, n) for (ll i = 0; i < ll(n); ++i) #define REPI(i, init, n) for (ll i = init; i < ll(n); ++i) #define REPD(i, init) for (ll i = init; i >=0; --i) #define REPDI(i, init, n) for (ll i = init; i >=n; --i) #define REPE(i, c) for (const auto& i : c) #define TCASE() ll _ttt; cin >> _ttt; while(_ttt--) using vl = vector; using vvl = vector; using vvvl = vector; #define VL(a, n) vector a; a.assign(n, 0); #define VLI(a, n) vector a; a.assign(n, 0); for(auto& x : a) cin >> x; void yn(bool f) { std::cout << (f ? "Yes" : "No") << endl; }; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin >> n; VLI(a, n); bool ok = false; set s; REP(i, n - 1) { vector v; v.reserve(s.size() + 1); v.push_back(a[i]); REPE(e, s) { v.push_back(e ^ a[i]); } REPE(e, v) { if (s.find(e) != s.end()) { ok = true; break; } s.insert(e); } } yn(ok); }