#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  int ans[n];
  for (int i = 0; i < n - 1; i++) {
    ans[i] = arr[i] ^ arr[i + 1];
  }
  ans[n - 1] = arr[0] ^ arr[n - 1];
  sort(ans, ans + n);
  for (int i = 0; i < n; i++) {
    if (arr[i] != ans[i]) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
