#include namespace nono { void solve() { int n; std::cin >> n; std::vector a(n); for (int i = 0; i < n; i++) std::cin >> a[i]; int all = 0; for (int i = 0; i < n; i++) all ^= a[i]; if (all != 0) { std::cout << "No" << '\n'; return; } const int MAX_A = 10005; std::vector used(MAX_A); for (int i = 0; i < n; i++) { if (used[a[i]] && n > 2) { std::cout << "Yes" << '\n'; return; } used[a[i]] = true; } std::vector cur(MAX_A); for (int i = 0; i + 1 < n; i++) { if (cur[a[i]]) { std::cout << "Yes" << '\n'; return; } std::vector next(MAX_A); next[a[i]] = true; for (int j = 0; j < MAX_A; j++) { if (cur[j]) { next[j] = true; next[j ^ a[i]] = true; } } cur = std::move(next); } std::cout << "No" << '\n'; } } // namespace nono int main() { std::cin.tie(0)->sync_with_stdio(0); std::cout << std::fixed << std::setprecision(16); int t = 1; while (t--) nono::solve(); }