#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
constexpr ll INF = 1000000000;
namespace utils {
template <class T, class Compare>
using p_queue = priority_queue<T, vector<T>, Compare>;
template <class T>
using min_queue = p_queue<T, greater<T>>;
template <class T>
using max_queue = p_queue<T, less<T>>;
template <class T>
bool min_update(T& X, const T& A) {
  if (X > A) {
    X = A;
    return true;
  }
  return false;
}
template <class T>
bool max_update(T& X, const T& A) {
  if (X < A) {
    X = A;
    return true;
  }
  return false;
}
using V_Set = unordered_set<int>;
using E_Set = unordered_map<int, V_Set>;
}  // namespace utils
using namespace utils;
bool check(vector<int> k) {
  for (int i = 0; i < k.size(); ++i) {
    int n = i == k.size() - 1 ? k[0] : k[i + 1];
    int p = i == 0 ? k.back() : k[i - 1];
    if (k[i] != (p ^ n)) return false;
  }
  return true;
}
void sub_main(istream& is) {
  ll N;
  is >> N;
  if (!is) return;
  map<int, int> a;
  for (int i = 0; i < N; ++i) {
    int t;
    is >> t;
    a[t]++;
  }
  vector<int> k;
  while (k.size() < N) {
    unordered_set<int> rm;
    for (auto&& x : a) {
      k.push_back(x.first);
      x.second--;
      if (x.second == 0) rm.insert(x.first);
    }
    for (auto&& x : rm) {
      a.erase(x);
    }
  }
  bool yes = check(k);
  cout << (yes ? "Yes" : "No") << endl;
}
int main(int argc, char* argv[]) {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(16) << scientific;
  sub_main(cin);
  return 0;
}
