#include <bits/stdc++.h>
const int INF = 1000000007;
const long double EPS = 1e-15;
const long double PI = acos(-1);
using namespace std;
using Graph = vector<vector<int>>;
using Graph_weighted = vector<vector<pair<int, int>>>;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long ceil(const long long a, const long long b) { return (a + b - 1) / b; }
int main() {
  long long n;
  cin >> n;
  map<long long, long long> m;
  vector<long long> v(n), ans(n);
  priority_queue<long long> q;
  for (int i = 0; i < (n); ++i) {
    cin >> v[i];
    m[v[i]]++;
    q.push(v[i]);
  }
  long long a = v[0], b = v[1];
  m[a]--;
  m[b]--;
  if (m[a ^ b]) {
    ans[0] = a, ans[1] = a ^ b, ans[2] = b;
    m[a ^ b]--;
    for (int i = 3; i < n; i++) {
      if (i == n - 1) {
        if (m[ans[0] ^ ans[n - 1]]) {
          cout << "Yes" << endl;
          return 0;
        } else {
          cout << "No" << endl;
          return 0;
        }
      }
      if (m[ans[i - 1] ^ ans[i - 2]]) {
        ans[i] = ans[i - 1] ^ ans[i - 2];
        m[ans[i - 1] ^ ans[i - 2]]--;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
    return 0;
  }
  return 0;
}
