#include <bits/stdc++.h>
using namespace std;
long long N, M, K, H, W, ans, mi1, mi2, sum;
string s;
int main() {
  cin >> N;
  vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (i == 0)
      ans = a[0];
    else
      ans = ans ^ a[i];
  }
  if (N % 3 == 0) {
    if (ans == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  if (N % 3 == 1) {
    for (int i = 0; i < N; i++) {
      if (a[i] == ans) {
        cout << "Yes" << endl;
        return 0;
      }
    }
    cout << "No" << endl;
    return 0;
  }
  bool b;
  b = false;
  if (N % 3 == 2) {
    for (int i = 0; i < N; i++) {
      if (ans ^ a[i] == 0) {
        b = true;
        break;
      }
    }
    if (b == true)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  return 0;
}
