#include <bits/stdc++.h>
const double PI = 3.14159265359;
const int INF = (int)1e9;
const long long LINF = 1e18;
const int IMOD = 1000000007;
const int dr[4] = {1, 0, -1, 0};
const int dc[4] = {0, 1, 0, -1};
using namespace std;
int main(void) {
  int n;
  cin >> n;
  set<int> cercle;
  for (int i = 0; i < (int)(n); i++) {
    int in;
    cin >> in;
    cercle.insert(in);
  }
  if (cercle.size() == 1) {
    if (cercle.count(0)) {
      cout << "Yes" << endl;
    }
  } else if (cercle.size() == 3) {
    int x = 0;
    for (auto c : cercle) {
      x ^= c;
    }
    if (!x) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
