#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 998244353;
long long qp(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
template <class T>
inline bool scan(T& ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
template <class T>
inline void out(T x) {
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
int n;
int a[maxn];
map<int, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    mp[a[i]]++;
  }
  if (mp.size() == 1) {
    if (mp[0] != 0)
      printf("Yes\n");
    else
      printf("No\n");
  } else if (mp.size() == 2) {
    int x[2], y[2];
    int t = 0;
    for (auto i : mp) {
      x[t] = i.first;
      y[t] = i.second;
      t++;
    }
    if (x[0] == 0 && y[1] == 2 * y[0])
      printf("Yes\n");
    else
      printf("No\n");
  } else if (mp.size() == 3) {
    int x[3], y[3];
    int t = 0;
    for (auto i : mp) {
      x[t] = i.first;
      y[t] = i.second;
      t++;
    }
    if (y[0] == y[1] && y[1] == y[2] && (x[0] ^ x[1] ^ x[2] == 0))
      printf("Yes\n");
    else
      printf("No\n");
  } else
    printf("No\n");
  return 0;
}
