#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A(n, 0);
  for (int i = 0; i < (int)n; ++i) cin >> A[i];
  map<int, int> mp;
  for (int i = 0; i < (int)n; ++i) mp[A[i]]++;
  vector<pair<int, int> > nums;
  for (pair<int, int> x : mp) {
    nums.push_back(x);
  }
  if (mp.size() == 3) {
    if ((nums[0].first ^ nums[1].first == nums[2].first) and
        (nums[2].first ^ nums[0].first == nums[1].first) and
        (nums[1].first ^ nums[2].first == nums[0].first) and
        (nums[0].second == nums[1].second) and
        (nums[1].second == nums[2].second))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else if (mp.size() == 2) {
    cout << "a" << endl;
  } else {
    if (nums[0].first == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
