#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long mod = 1e9 + 7;
const long long mod1 = 998244353;
const long long big = 1e18;
const double PI = 2 * asin(1);
int main() {
  int N;
  cin >> N;
  vector<long long> arr;
  map<long long, long long> amap;
  long long tmp[N];
  bool can = true;
  for (int i = 0; i < N; ++i) {
    cin >> tmp[i];
    if (tmp[i] != 0) can = false;
    if (amap[tmp[i]] == 0) arr.push_back(tmp[i]);
    amap[tmp[i]]++;
  }
  if (N == 3) {
    if ((tmp[0] ^ tmp[1]) == tmp[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
