#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 123, inf = 1e9, mod = 1e9 + 7;
const long long INF = 1e18;
int n, ans, x;
map<int, int> cnt;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  if (cnt.size() == 1) {
    printf("Yes");
    return 0;
  }
  ans = 1;
  if (cnt.size() != 3) ans = 0;
  for (auto it : cnt) {
    x ^= it.first;
    if (it.second * 3 != n) ans = 0;
  }
  if (ans && x == 0)
    printf("Yes");
  else
    printf("No");
  return 0;
}
