#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int N = 100005;
int n, a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  int totalSum = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    totalSum ^= a[i];
  }
  if (n % 3 == 0 && totalSum == 0) {
    cout << "Yes";
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    if (totalSum == a[i]) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
