#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100010];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  vector<int> v;
  v.push_back(a[0]);
  for (int i = 0; i < n - 1; i++) {
    if (a[i] != a[i + 1]) v.push_back(a[i + 1]);
  }
  if (v.size() == 1 && v[0] == 0)
    cout << "Yes" << endl;
  else if (v.size() == 3 && (v[0] ^ v[2]) == v[1] && (v[1] ^ v[0]) == v[2] &&
           (v[2] ^ v[1]) == v[0])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
