#include <bits/stdc++.h>
using namespace std;
int par[int(0x7ffffff)];
int Rank[int(0x7ffffff)];
void init(int n) {
  for (int i = 0; i < n; i++) {
    par[i] = i;
    Rank[i] = 0;
  }
}
int find(int x) {
  if (par[x] == x) {
    return x;
  } else {
    return par[x] = find(par[x]);
  }
}
void unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (Rank[x] < Rank[y]) {
    par[x] = y;
  } else {
    par[y] = x;
    if (Rank[x] == Rank[y]) Rank[x]++;
  }
}
bool same(int x, int y) { return find(x) == find(y); }
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const int MX = 3007;
const int MAX_N = 1 << 17;
int Q, dat[2 * MAX_N - 1];
void rmq_init(int n_) {
  Q = 1;
  while (Q < n_) Q *= 2;
  for (int i = 0; i < 2 * Q - 1; i++) dat[i] = (1e9);
}
void update(int k, int a) {
  k += Q - 1;
  dat[k] = a;
  while (k > 0) {
    k = (k - 1) / 2;
    dat[k] = min(dat[k * 2 + 1], dat[k * 2 + 2]);
  }
}
int query(int a, int b, int k = 0, int l = 0, int r = Q) {
  if (r <= a || b <= l) return (1e9);
  if (a <= l && r <= b)
    return dat[k];
  else {
    int vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
    int vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
    return min(vl, vr);
  }
}
const int M = 4;
vector<vector<long long> > mul(vector<vector<long long> >& A,
                               vector<vector<long long> >& B) {
  vector<vector<long long> > C(A.size(), vector<long long>(B[0].size()));
  for (int i = 0; i < A.size(); i++)
    for (int k = 0; k < B.size(); k++)
      for (int j = 0; j < B[0].size(); j++)
        C[i][j] = (C[i][j] + A[i][k] * B[k][j]) % M;
  return C;
}
vector<vector<long long> > pow(vector<vector<long long> > A, long long n) {
  vector<vector<long long> > B(A.size(), vector<long long>(A.size()));
  for (int i = 0; i < A.size(); i++) B[i][i] = 1;
  while (n > 0) {
    if (n & 1) B = mul(B, A);
    A = mul(A, A);
    n >>= 1;
  }
  return B;
}
long long N, a[int(1e5) + 5], b[int(1e5) + 5], use[int(1e5) + 5];
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    use[i] = a[i];
  }
  sort(a, a + N);
  long long res = N;
  if (N % 2 == 1) {
    N--;
  }
  long long counter = 0;
  while (N > 1) {
    if (counter % 2 == 0) {
      for (int i = 0; i < N / 2; i++) {
        b[i] = (a[i] ^ a[N - 1 - i]);
      }
    } else {
      for (int i = 0; i < N / 2; i++) {
        a[i] = (b[i] ^ b[N - 1 - i]);
      }
    }
    N /= 2;
    counter++;
  }
  if (counter % 2 != 0) {
    a[0] = b[0];
  }
  bool ans = false;
  for (int i = 0; i < res; i++) {
    if (0 == a[0] ^ use[res - 1]) {
      ans = true;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
