#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> num(n);
  for (int i = 0; i < (int)(n); i++) cin >> num[i];
  sort((num).begin(), (num).end());
  int buf1 = num[0];
  int buf2 = num[1];
  vector<bool> use(n, false);
  use[0] = true;
  use[1] = true;
  bool flag = true;
  for (int i = 0; i < (int)(n - 2); i++) {
    int buf3 = buf1 ^ buf2;
    vector<int>::iterator it = lower_bound((num).begin(), (num).end(), buf3);
    if (it == num.end() || *it != buf3) {
      flag = false;
      break;
    } else {
      int d = distance(num.begin(), it);
      if (use[distance(num.begin(), it)] == true) {
        while (num[d] == buf3 && use[d]) {
          d++;
        }
      }
      if (!(num[d] == buf3 && !use[d])) {
        flag = false;
        break;
      }
      use[distance(num.begin(), it)] = true;
      buf1 = buf2;
      buf2 = buf3;
    }
  }
  flag = flag && (buf1 ^ buf2) == num[0];
  string s = (flag) ? "Yes" : "No";
  cout << s << endl;
}
