#include <bits/stdc++.h>
std::istream& operator>>(std::istream& input, __int128_t& value) {
  long long tmp;
  input >> tmp;
  value = tmp;
  return input;
}
std::ostream& operator<<(std::ostream& output, const __int128_t value) {
  output << (long long)value;
  return output;
}
const int MAX_N = 1e5 + 7;
int N;
int a[MAX_N];
std::map<int, int> mp;
int main(int argc, char** argv) {
  std::cin >> N;
  for (int i = 1; i <= N; i++) {
    std::cin >> a[i];
    mp[a[i]]++;
  }
  if (3 < mp.size()) {
    std::cout << "No" << std::endl;
    return 0;
  }
  if (mp.size() == 1) {
    if (a[1] == 0) {
      std::cout << "Yes" << std::endl;
    } else {
      std::cout << "No" << std::endl;
    }
    return 0;
  }
  if (mp.size() == 2) {
    std::cout << "No" << std::endl;
    return 0;
  }
  int i = 0;
  std::vector<int> x, y;
  for (auto p : mp) {
    x.push_back(p.first);
    y.push_back(p.second);
  }
  if (x[0] ^ x[1] == x[2] && y[0] == y[1] && y[1] == y[2]) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}
