#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  sort((a).begin(), (a).end());
  long long x = a[0], y = -1, z = -1;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] != a[i + 1]) {
      if (y == -1)
        y = a[i + 1];
      else if (z == -1)
        z = a[i + 1];
      else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  if (x ^ y ^ z == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
