#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long a[maxn];
int main() {
  long long n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    bool flag = true;
    if (n == 1) {
      cout << "Yes" << endl;
    } else if (n == 2) {
      if (a[0] == a[1] && a[0] == 0)
        cout << "Yes" << endl;
      else {
        cout << "No" << endl;
      }
    } else {
      for (int i = 0; i < n; i++) {
        long long temp = a[i] ^ a[(i + 1) % n];
        if (temp != a[(i + 2) % n]) {
          flag = false;
          break;
        }
      }
      if (flag) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    }
  }
  return 0;
}
