#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100010];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n >= 4) {
    bool ok = true;
    for (int i = 0; i < n; i++) {
      if (a[i] != 0) ok = false;
    }
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    bool ok = false;
    if ((a[0] ^ a[2]) == a[1] && (a[1] ^ a[0]) == a[2] && (a[2] ^ a[1]) == a[0])
      ok = true;
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
