#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
const int maxn = 1e5 + 10;
long long ans, a[maxn], n;
int main() {
  scanf("%lld", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", a + i);
    ans ^= a[i];
    ++mp[a[i]];
  }
  vector<int> vec;
  for (auto cur : mp) vec.push_back(cur.second);
  if (vec.size() != 3 || vec[0] != vec[1] || vec[1] != vec[2] || ans)
    puts("No");
  else
    puts("Yes");
  return 0;
}
