#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  map<int, int> map;
  bool zero = false;
  for (int i = 0; i < (int)(N); i++) {
    cin >> a[i];
    map[a[i]] += 1;
    if (a[i] != 0) zero = true;
  }
  int count = 0;
  bool val = true;
  bool bnum = true;
  bool bxor = true;
  int tmp = 0;
  ll ixor;
  for (auto x : map) {
    if (count == 0)
      ixor = x.first;
    else
      ixor ^= x.first;
    if (count > 0) {
      if (tmp != x.second) bnum = false;
    }
    tmp = x.second;
    count++;
  }
  if (count != 3) val = false;
  if (ixor != 0) bxor = false;
  string ans = "Yes";
  if ((!bnum || !val || !bxor) && zero) ans = "No";
  cout << ans << endl;
  return 0;
}
