#include #include #include #include using namespace std; int I() { int x; cin >> x; return x; } vector LI() { int n = I(); vector vec(n); for (int i = 0; i < n; ++i) { cin >> vec[i]; } return vec; } int main() { int n = I(); vector a = LI(); unordered_map a_cnt; for (int i = 0; i < n; ++i) { a_cnt[a[i]]++; } unordered_map dp; dp[0] = 1; for (auto &[num, count] : a_cnt) { unordered_map ndp; int mul = 1 << (count - 1); for (auto &[val, cnt] : dp) { ndp[val] += cnt * mul; ndp[val ^ num] += cnt * mul; } dp = ndp; } if (dp[0] == 2) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }