#include using namespace std; const int64_t inf = 1e18; const int64_t mod = 998244353; // const int64_t mod = 1000000007; int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector b; for (int i = 0; i < n; i++) { long long y = a[i]; for (auto x: b) { y = min(y, y ^ x); } if (y > 0) b.push_back(y); } long long allxor = 0; for (int i = 0; i < n; i++) { allxor ^= a[i]; } int m = b.size(); if (n - m < 2 || allxor != 0) cout << "No" << endl; else cout << "Yes" << endl; }