#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  sort((a).begin(), (a).end());
  for (int i = 0; i < (int)(n); i++) cout << a[i];
  bool ans = false;
  if (n % 3 == 0) {
    int x = a[0];
    int y = a[n / 3];
    int z = a[2 * n / 3];
    bool b0 = x == 0 && a[n / 3 - 1] == x && a[n - 1] == y;
    bool b1 =
        x != 0 && a[n / 3 - 1] == x && a[2 * n / 3 - 1] == y && a[n - 1] == z;
    bool b2 = x ^ y == z;
    bool b3 = x != y && y != z;
    ans = b0 || (b1 && b2 && b3);
  } else {
    ans = a[n - 1] == 0;
  }
  cout << (ans ? "Yes" : "No") << endl;
}
