#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++) { for (auto x: b) { a[i] = min(a[i], a[i]^x); } if (a[i] > 0) b.push_back(a[i]); } int m = b.size(); if (n - m < 2) cout << "No" << endl; else cout << "Yes" << endl; }