#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vll = vector<long long int>;
using vs = vector<string>;
ll sm(vll x) {
  ll sum = 0;
  for (long long int i = 0; i < x.size(); i++) sum += x[i];
  return sum;
}
void vdeb(string s, vector<int> x) {
  cout << s << " = { ";
  for (long long int i = 0; i < x.size(); i++) cout << x[i] << ' ';
  cout << '}' << endl;
}
int main() {
  ll N;
  cin >> N;
  vll a(N);
  vll x(N);
  for (long long int i = 0; i < N; i++) {
    cin >> a[i];
    x[i] = a[i];
  }
  for (long long int i = 0; i < N - 1; i++) {
    x[i] ^= x[i + 1];
  }
  x[N - 1] ^= x[0];
  int flag = 0;
  sort((a).begin(), (a).end());
  ;
  for (long long int i = 0; i < N - 2; i++) {
    if (x[i] != a[i + 2]) flag = 1;
  }
  if (x[N - 2] != a[0]) flag = 1;
  if (x[N - 1] != a[1]) flag = 1;
  if (flag == 0)
    cout << "Yes";
  else
    cout << "No";
  cout << endl;
  return 0;
}
