#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  set<long long> s;
  bool ok = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    s.insert(a[i]);
    ok = (!a[i]);
  }
  long long sum = 0;
  for (auto x : s) {
    sum ^= x;
  }
  if (s.size() == 3 && sum == 0)
    cout << "Yes";
  else if (s.size() == 2 && ok)
    cout << "Yes";
  else if (s.size() == 1 && ok)
    cout << "Yes";
  else
    cout << "No";
}
