#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    for (int i = 0; i < N; ++i) {
        cin >> A[i];
    }

    int now = 0;
    for (int a : A) {
        now ^= a;
    }
    if (now != 0) {
        cout << "No" << endl;
        return 0;
    }

    if (N > 5000) {
        cout << "Yes" << endl;
        return 0;
    }

    vector<vector<int>> dp(N + 1, vector<int>(8192, 0));
    dp[0][0] = 1;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 8192; ++j) {
        	dp[i + 1][j] += dp[i][j];
        	if (dp[i + 1][j] > 5) dp[i + 1][j] = 5;
            dp[i + 1][A[i] ^ j] += dp[i][j];
            if (dp[i + 1][A[i] ^ j] > 5) dp[i + 1][A[i] ^ j] = 5;
        }
    }
    if (dp[N][0] >= 3) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

    return 0;
}