#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn];
int num[4], id = 0, cnt = 0, v = -1;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  if (n % 3 != 0) {
    for (int i = 1; i <= n; ++i)
      if (a[i] != 0) {
        cout << "No" << endl;
        return 0;
      }
    cout << "Yes" << endl;
    return 0;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) {
    if (a[i] != v) {
      cnt = 1;
      v = a[i];
    } else
      cnt++;
    if (cnt == n / 3) {
      num[++id] = v;
      cnt = 0;
    }
  }
  if (id != 3) {
    cout << "No" << endl;
  } else if (num[1] ^ num[2] ^ num[3] == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
