#include <bits/stdc++.h>
using namespace std;
set<long long int> S;
map<long long int, int> C;
int N;
long long int a[100005];
int main(void) {
  cin >> N;
  long long int check = 0;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    S.insert(a[i]);
    C[a[i]]++;
    check = check ^ a[i];
  }
  long long int x = a[1];
  C[a[1]]--;
  long long int y = a[2];
  C[a[2]]--;
  long long int z;
  string ans = "Yes";
  for (int i = 1; i <= N - 2; i++) {
    z = x ^ y;
    if (S.count(z) != 0 && C[z] > 0) {
      C[z]--;
    } else {
      ans = "No";
      break;
    }
    x = y;
    y = z;
  }
  if ((x ^ y) != a[1]) {
    ans = "No";
  }
  if ((y ^ a[1]) != a[2]) {
    ans = "No";
  }
  if (check != 0) {
    ans = "No";
  }
  cout << ans << endl;
  return 0;
}
