#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
long long pow(long long a, int b) {
  return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < (n); ++i) {
    int a;
    cin >> a;
    mp[a]++;
  }
  int flg = 0;
  if (n % 3 != 0) {
    if (mp[0] == n) {
      flg = 1;
    }
  } else {
    if ((int)mp.size() == 2) {
      if (mp[0] == n * 2 / 3) flg = 1;
    } else if ((int)mp.size() == 3) {
      int cal = 0;
      for (auto e : mp) {
        cal ^= e.first;
      }
      if (cal == 0) flg = 1;
    }
  }
  if (flg == 0)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
