#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N, 0);
  vector<int> store;
  vector<int> table;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < N; i++) {
    bool found = false;
    for (int j = 0; j < store.size(); j++) {
      if (A[i] == store[j]) {
        found = true;
        table[j]++;
        break;
      }
    }
    if (!found) {
      table.push_back(1);
      store.push_back(A[i]);
      if (store.size() > 3) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  if (store.size() == 1) {
    if (store[0] == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  if (store.size() == 2) {
    cout << "No" << endl;
    return 0;
  }
  int res = store[0] ^ store[1] ^ store[2];
  if (res) {
    cout << "No" << endl;
  } else {
    if (table[0] == table[1] && table[1] == table[2]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
