#include <bits/stdc++.h>

#define fi first
#define se second

const int N = 200200;
const long long mod = 998244353;

using namespace std;


int main()
{
        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);
        ios_base::sync_with_stdio(0);

        int n;
        cin >> n;
        set < int > s;
        for(int i = 1; i <= n; i++){
                int x;
                cin >> x;
                s.insert(x);
        }
        int res = 0;
        for(auto x: s){
                res ^= x;
        }
        if(s.size() <= __gcd(n, 3) && res == 0){
                cout << "Yes";
        } else{
                cout << "No";
        }
}
