#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
long long a[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  int n, cnt = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) cnt++;
  }
  if (n == 3) {
    if ((a[0] ^ a[1]) == a[2] && a[0] ^ a[2] == a[1] && a[1] ^ a[2] == a[0])
      cout << "Yes";
    else
      cout << "No";
  } else {
    if (cnt != n)
      cout << "No";
    else
      cout << "Yes";
  }
  return 0;
}
