#include <bits/stdc++.h>
const int N = 200200;
const long long mod = 998244353;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  set<int> s;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    s.insert(x);
  }
  int res = 0;
  for (auto x : s) {
    res ^= x;
  }
  if (s.size() <= 3 && res == 0) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
