#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  long long ans = 0;
  set<long long> s;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ans = ans ^ a[i];
    s.insert(a[i]);
  }
  auto itr = s.begin();
  auto itr2 = itr;
  ++itr2;
  auto itr3 = itr2;
  ++itr3;
  if (s.size() == 1 && *itr == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 1 && s.size() == 2 && (*itr ^ *itr2) == (*itr) && ans == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 1 && s.size() == 2 && (*itr ^ *itr2) == (*itr) &&
      ans == (*itr)) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 1 && s.size() == 2 && (*itr ^ *itr2) == (*itr2) && ans == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 1 && s.size() == 2 && (*itr ^ *itr2) == (*itr2) &&
      ans == (*itr2)) {
    cout << "Yes" << endl;
    return 0;
  }
  if (ans == 0 && s.size() == 3 && (*itr ^ *itr2 ^ *itr3) == 0 && n % 3 == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
}
