#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long first, second;
  cin >> first >> second;
  map<long long, int> m;
  long long a;
  for (int i = 0; i < N - 2; i++) {
    cin >> a;
    m[a]++;
  }
  long long current = first;
  long long next = second;
  long long next_next = current ^ next;
  long long count = 0;
  m[next]--;
  while (m[next_next] > 0) {
    m[next_next]--;
    current = next;
    next = next_next;
    next_next = current ^ next;
    count++;
  }
  if (count != N - 2) {
    cout << "No" << endl;
    return 0;
  }
  if (next_next == first && (next ^ next_next) == second) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
}
