#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
const ll INF = 1LL << 60;
int main() {
  int n, a;
  bool ans = true;
  cin >> n;
  vector<int> arr1(n), arr2(2);
  for (int i = 0; i < (int)(n); i++) {
    cin >> arr1[i];
  }
  sort(arr1.begin(), arr1.end());
  arr2[0] = arr1[0];
  arr2[1] = arr1[1];
  for (int i = 0; i < (int)(n - 2); i++) {
    arr2.push_back(arr2[i] ^ arr2[i + 1]);
  }
  for (int i = 0; i < (int)(n); i++)
    if (arr1[i] != arr2[i]) ans = false;
  if (ans) {
    a = arr1[0];
    for (int i = 0; i < (int)(n - 1); i++) a ^= arr1[i + 1];
  } else {
    cout << "Yes" << endl;
    return 0;
  }
  if (!a) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
