#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  set<int> all;
  map<int, int> K;
  for (int x = 0; x < (N); x++) {
    int a;
    cin >> a;
    all.insert(a);
    K[a]++;
  }
  if (N == 3) {
    int A[3];
    int i = 0;
    for (int a : all) {
      A[i] = a;
    }
    if (A[0] ^ A[2] == A[1] && A[1] ^ A[0] == A[2] && A[1] ^ A[2] == A[0]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
      ;
    }
  } else if (N % 3 == 0) {
    int ans = 0;
    vector<int>(A);
    ;
    for (int a : all) {
      ans += K[a] / 3;
      for (int x = 0; x < (K[a] / 3); x++) {
        (A).push_back((a));
        ;
      }
    }
    if (ans == N / 3) {
      int ans = 0;
      for (int x = 0; x < (A.size()); x++) {
        ans ^= A[x];
      }
      if (ans == 0) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
        ;
      }
    } else {
      cout << "No" << endl;
      ;
    }
  } else {
    if (K[0] == N) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
      ;
    }
  }
  return 0;
}
