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