#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (auto &c : v) cin >> c;
  if (n == 3) {
    if (v[0] == (v[1] ^ v[2]))
      cout << "Yes"
           << "\n";
    else
      cout << "No"
           << "\n";
    return 0;
  }
  bool flag = true;
  if (n % 2 == 0) {
    map<long long, long long> m;
    for (auto c : v) m[c]++;
    for (auto c : m)
      if (c.second & 1) flag = false;
  } else {
    for (long long i = 1; i < n; i++)
      if (v[i] != v[i - 1]) flag = false;
  }
  if (flag) {
    cout << "Yes"
         << "\n";
  } else {
    cout << "No"
         << "\n";
  }
  return 0;
}
