#include <bits/stdc++.h>
using namespace std;
int n, a[100000];
int main() {
  cin >> n;
  int cnt[3] = {};
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n % 3) {
    cout << "No";
    return 0;
  }
  sort(a, a + n);
  int x = 0;
  for (int i = 0; i < n; i += (n / 3)) {
    x = x ^ a[i];
    for (int j = i; j < i + n / 3; j++) {
      if (a[i] != a[j]) {
        cout << "No";
        return 0;
      }
    }
  }
  if (x)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
