#include <bits/stdc++.h>
const long long N = 1e5 + 10;
const long long inf = 2147483647;
using namespace std;
template <typename tp>
inline void read(tp &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; c < '0' || c > '9'; f |= (c == '-'), c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar())
    ;
  if (f) x = -x;
}
long long sum;
int n, a[N], cnt;
pair<int, int> num[10];
signed main() {
  read(n);
  for (int i = 1; i <= n; i++) {
    int flag = 0;
    read(a[i]);
    sum += a[i];
    for (int j = 1; j <= cnt; j++)
      if (num[j].first == a[i]) {
        flag = 1;
        num[j].second++;
        break;
      }
    if (!flag) {
      if (cnt == 3) return 0 * puts("No");
      num[++cnt].first = a[i];
      num[cnt].second = 1;
    }
  }
  sort(num + 1, num + cnt + 1);
  if (sum == 0)
    puts("Yes");
  else if ((num[1].first ^ num[3].first == num[2].first ||
            num[1].first ^ num[2].first == num[3].first) &&
           num[1].second == num[2].second && num[1].second == num[3].second)
    puts("Yes");
  else
    puts("No");
  return 0;
}
