#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
unordered_map<int, int> mp;
int n, a[maxn];
int tot = 0;
int cnt[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (!mp.count(a[i])) mp[a[i]] = ++tot;
    cnt[mp[a[i]]]++;
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans ^= a[i];
  if (n % 3 != 0 || 3 != mp.size() || ans != 0)
    printf("No\n");
  else if (cnt[1] == cnt[2] && cnt[2] == cnt[3])
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
