#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  a.resize(n);
  for (auto &i : a) cin >> i;
  if (n == 3) {
    if ((a[0] ^ a[1]) == a[2])
      return cout << "Yes" << endl, 0;
    else
      return cout << "No" << endl, 0;
  }
  if (count(a.begin(), a.end(), 0) == n)
    cout << "Yes" << endl;
  else
    cout << "No";
}
