#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9;
const int nmax = 1e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int &x : v) cin >> x;
  vector<int> v2 = v;
  sort(v2.begin(), v2.end());
  v2.erase(unique(v2.begin(), v2.end()), v2.end());
  if (v2.size() == 1)
    cout << "No\n";
  else if (v2.size() != 3 or v2.size() % 3 != 0)
    cout << "No\n";
  else {
    int jor = 0;
    for (int x : v2) jor ^= x;
    if (!jor)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
