#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
constexpr int I_INF = numeric_limits<int>::max();
constexpr ll L_INF = numeric_limits<ll>::max();
template <typename T1, typename T2>
bool chmin(T1& a, const T2& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
bool chmax(T1& a, const T2& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
class Prints {
 private:
  class __Prints {
   public:
    __Prints(const char* sep, const char* term) : sep(sep), term(term) {}
    template <class... Args>
    void operator()(const Args&... args) const {
      print(args...);
    }

   private:
    const char *sep, *term;
    void print() const { std::cout << term; }
    void print_rest() const { std::cout << term; }
    template <class T, class... Tail>
    void print(const T& head, const Tail&... tail) const {
      std::cout << head, print_rest(tail...);
    }
    template <class T, class... Tail>
    void print_rest(const T& head, const Tail&... tail) const {
      std::cout << sep << head, print_rest(tail...);
    }
  };

 public:
  Prints() {}
  __Prints operator()(const char* sep = " ", const char* term = "\n") const {
    return __Prints(sep, term);
  }
};
Prints prints;
void solve() {
  ll N;
  cin >> N;
  Vl A(N);
  for (ll i = 0; i < N; i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  if (N == 3) {
    bool ok = false;
    do {
      if ((A[0] ^ A[2]) == A[1] && (A[1] ^ A[0]) == A[2] &&
          (A[2] ^ A[1]) == A[0]) {
        ok = true;
        break;
      }
    } while (next_permutation(A.begin(), A.end()));
    prints()(ok ? "Yes" : "No");
  } else {
    prints()(A[0] == 0 && A[N - 1] == 0 ? "Yes" : "No");
  }
}
int main() {
  cin.tie(nullptr), cout.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(18) << fixed;
  solve();
  cout << flush;
  return 0;
}
