#include <bits/stdc++.h>
namespace tools {
template <typename T>
void read(std::vector<T>& vector,
          const typename std::vector<T>::size_type size) {
  vector.reserve(size);
  std::copy_n(std::istream_iterator<T>(std::cin), size,
              std::back_inserter(vector));
}
template <typename T, std::size_t N>
void read(std::array<T, N>& array) {
  std::copy_n(std::istream_iterator<T>(std::cin), N, array.begin());
}
}  // namespace tools
int main() {
  std::int_fast64_t N;
  std::cin >> N;
  std::vector<std::uint_fast64_t> a;
  tools::read(a, N);
  if (N == 3) {
    std::cout << ((a[0] ^ a[1]) == a[2] ? "Yes" : "No") << std::endl;
  } else {
    std::cout << (std::all_of(
                      a.begin(), a.end(),
                      [](const std::uint_fast64_t a_i) { return a_i == 0; })
                      ? "Yes"
                      : "No")
              << std::endl;
  }
  return 0;
}
