#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int main() {
  map<int, int> s;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    ++s[x];
  }
  if (s.size() == 2) {
    int ft = s.begin()->second, st = next(s.begin())->second;
    if (s.begin()->first != 0) {
      cout << "No\n";
      return 0;
    }
    if (ft * 2 != st) {
      cout << "No\n";
      return 0;
    }
    cout << "Yes\n";
    return 0;
  }
  if (s.size() > 3) {
    cout << "No\n";
    return 0;
  }
  if (s.size() == 1) {
    if (s.begin()->first == 0)
      cout << "Yes\n";
    else
      cout << "No\n";
    return 0;
  }
  int x = 0, eq = s.begin()->second;
  for (auto i : s) {
    x ^= i.first;
    if (eq != i.second) {
      cout << "No\n";
      return 0;
    }
  }
  if (x) cout << "No\n";
  cout << "Yes\n";
}
