#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  vector<int> twoSum(vector<int>& nums, int target) {
    int i = 0, j = 0;
    vector<int> ans;
    int k = 0;
    for (i = 0; i < nums.size(); i++) {
      for (j = i; j < nums.size(); j++) {
        if (i != j && (nums[i] + nums[j] == target)) {
          ans.push_back(i);
          ans.push_back(j);
          k = 0;
          break;
        }
        k++;
      }
      if (k == 0) break;
    }
    return ans;
  }
};
int main() {
  int i, j, n, c = 0, k;
  cin >> n;
  int a[n + 1];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n && j != i; j++) {
      for (k = 0; k < n && k != i && k != j; k++) {
        if ((a[j] ^ a[k]) != a[i]) {
          c = 1;
          break;
        }
      }
      if (c == 1) break;
    }
    if (c == 1) break;
  }
  if (c == 1)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
int mA() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<int> nums = {2,  7,   11,     15,    -100, 19, 9,  101,
                      87, 199, 100101, -1818, 29,   -1, 101};
  int target = 98;
  Solution o;
  vector<int> ans = {o.twoSum(nums, target)};
  for (auto i : ans) {
    cout << i << " ";
  }
  return 0;
}
