#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long i, j, k, l, m, n, a[200000];
    cin >> n;
    map<long long, long long> ma;
    long long t = 1;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      ma[a[i]]++;
      if (a[i] != 0) t = 0;
    }
    if (t) {
      cout << "Yes";
      return 0;
    }
    if (n % 3 != 0) {
      cout << "No";
      return 0;
    }
    long long ans = 0;
    for (auto i : ma) {
      if (i.second * 3 != n) {
        cout << "No";
        return 0;
      }
      ans ^= i.first;
    }
    if (ans == 0) {
      cout << "Yes";
      return 0;
    }
    cout << "No";
    return 0;
  }
  return 0;
}
