#include using namespace std; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, xorv = 0; cin >> n; vector b; bool flg = false; for(int i = 0; i < n; i++){ int v; cin >> v; xorv ^= v; if(v == 0){ flg = true; } for(auto &&e : b){ v = min(v, v ^ e); } if(v != 0){ b.push_back(v); } } cout << ((flg || b.size() <= n - 2) && xorv == 0 ? "Yes" : "No") << '\n'; }