#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  if (fopen("input.txt", "r"))
    freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  ios::sync_with_stdio(0), cin.tie(0);
  long long n, ok = 1;
  cin >> n;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    m[x]++;
  }
  if (m.size() == 1 and m.begin()->first == 0) {
    cout << "Yes";
    return 0;
  }
  if (m.size() != 3) ok = 0;
  long long j = 0, a[3];
  for (auto i : m) {
    a[j] = i.first;
    j++;
  }
  if (a[0] ^ a[1] != a[3]) ok = 0;
  if (ok)
    cout << "Yes";
  else
    cout << "No";
}
