#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() int main() { cin.tie(nullptr); int N; cin >> N; vector A(N); rep(i, 0, N) cin >> A[i]; int sum = 0; rep(i, 0, N) sum ^= A[i]; if (sum != 0) { cout << "No\n"; return 0; } else if (N >= 5002) { cout << "Yes\n"; return 0; } vector dp(N, vector(1 << 13, 1 << 20)); dp[0][A[0]] = 1; rep(i, 1, N) rep(j, 0, 1 << 13) { dp[i][j] = dp[i - 1][j]; dp[i][j] = min(dp[i][j], dp[i - 1][j ^ A[i]] + 1); } if (dp[N - 1][0] < N) cout << "Yes\n"; else cout << "No\n"; }