#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int N;
vector<int> a;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  a.resize(N);
  for (int i = 0, i_len = (N); i < i_len; ++i) {
    cin >> a[i];
  }
  bool ans = true;
  sort((a).begin(), (a).end());
  if (N == 3) {
    for (int i = 0; i < 3; ++i) {
      int Xor = a[(i - 1 + N) % N] ^ a[(i + 1) % N];
      if (Xor != a[i]) {
        ans = false;
        break;
      }
    }
    cout << (ans ? "Yes" : "No") << endl;
    return 0;
  } else if (N == 4 || N == 5) {
    for (int i = 0, i_len = (N); i < i_len; ++i) {
      if (a[i] != 0) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    return 0;
  } else if (N & 1) {
    if (a[0] != 0) {
      cout << "No" << endl;
      return 0;
    }
    if (a[1] != 0) {
      cout << "No" << endl;
      return 0;
    }
    if (a[2] != 0) {
      cout << "No" << endl;
      return 0;
    }
    for (int i = 3; i < N; ++i) {
      if (a[i] == a[3]) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    return 0;
  } else {
    if (a[0] != 0) {
      cout << "No" << endl;
      return 0;
    }
    if (a[1] != 0) {
      cout << "No" << endl;
      return 0;
    }
    for (int i = 3; i < N; i++) {
      if (a[2] != a[i]) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
