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