#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n % 3 != 1) {
    int ok = 1;
    for (int i = 0; i < n; i++) {
      if (a[i] != 0) ok = 0;
    }
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    long long int t = 0;
    for (int i = 0; i < n; i++) {
      t ^= a[i];
    }
    if (t == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
