#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, x = 0, zero = 0;
  cin >> n;
  bool ans = true, ok = true;
  set<int> f;
  for (int i = 0; i < n; i++) {
    cin >> b;
    f.insert(b);
    x ^= b;
    if (b == 0) zero++;
  }
  if (n - zero == 1 || (f.size() < 3 && n % 3 != 0)) ok = false;
  ans = (x == 0);
  cout << (ans && ok ? "Yes" : "No") << endl;
  return 0;
}
