#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a.at(i);
  sort((a).begin(), (a).end());
  if (n > 3) {
    if (a.at(0) == 0 && a.at(n - 1) == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    if (a.at(0) ^ a.at(1) ^ a.at(2) == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
