#include <bits/stdc++.h>
using namespace std;
int n;
set<int> s;
int a[100005];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s.insert(a[i]);
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i < n; i++) {
    if (s.find(a[i] ^ a[i + 1]) == s.end()) {
      cout << "No";
      return 0;
    }
  }
  if (s.find(a[1] ^ a[n]) == s.end()) {
    cout << "No";
    return 0;
  }
  cout << "Yes";
}
