#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1LL << 61;
const long long int mod = 1000000007LL;
long long int n = 0, m = 0, ans = 0, tmp = 0, ma = -inf, mi = inf;
string s;
long long int dx[9] = {0, 1, 0, -1, 0, 1, 1, -1, -1},
              dy[9] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  map<long long int, long long int> mp;
  for (long long int i = (long long int)(0LL); i < (long long int)(n); i++) {
    cin >> tmp;
    mp[tmp]++;
  }
  long long int cnt = mp[tmp];
  bool ok = true;
  if (mp.size() != 3) ok = false;
  for (auto it : mp) {
    if (!ok) break;
    ans ^= it.first;
    if (it.second != cnt) ok = false;
  }
  if (ok && ans == 0)
    cout << "Yes" << '\n';
  else
    cout << "No" << '\n';
  return 0;
}
