#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const int MOD = 1000000007;
const double PI = acos(-1);
int main() {
  int N;
  cin >> N;
  map<int, int> A;
  bool t = true;
  for (int i = 0; i < (N); i++) {
    int a;
    cin >> a;
    A[a]++;
    if (a != 0) t = false;
  }
  if (t) {
    cout << "Yes" << endl;
  } else {
    int cnt = 0;
    t = true;
    int tmp = 0;
    for (auto a : A) {
      cnt++;
      tmp ^= a.first;
      if (a.second * 3 != N) t = false;
    }
    if (cnt != 3) t = false;
    if (tmp != 0) t = false;
    if (t) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
