#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long powD(long long a, long long b) {
  long long ans = 1;
  a %= (1000000007);
  for (int i = 0; i < b; i++) {
    ans *= a;
    ans %= (1000000007);
  }
  return ans;
}
int main() {
  int i, j, k;
  int N, M, K;
  cin >> N;
  map<int, int> A;
  queue<int> Q;
  for ((i) = 0; i < (int)(N); i++) {
    int a;
    cin >> a;
    Q.push(a);
    A[a]++;
  }
  int first = Q.front();
  Q.pop();
  bool isClear = true;
  int left = first;
  int mid = Q.front();
  Q.pop();
  auto X = A;
  X[left]--;
  X[mid]--;
  for (i = 1; i < N - 1; i++) {
    if (X[left ^ mid] < 1) {
      cout << "No";
      return 0;
    }
    int tmp = left;
    left = mid;
    mid = tmp ^ mid;
    X[mid]--;
  }
  if ((left ^ mid) != first) {
    cout << "No";
    return 0;
  }
  cout << "Yes";
  return 0;
}
