#include <bits/stdc++.h>
using namespace std;
const static unsigned long long INVALID_DIGIT = ~(unsigned long long)0;
static const unsigned long long DIVIDER = 1000000007l;
using namespace std;
bool checkPossibility(unordered_map<unsigned long long, int>& gusu,
                      unordered_map<unsigned long long, int>& kisu,
                      unsigned long long left, unsigned long long curVal,
                      unsigned long long firstLeft, unsigned long long pos,
                      unsigned long long N) {
  if (pos + 2 == N) {
    return (firstLeft ^ left) == curVal;
  }
  if (curVal % 2 == 1) {
    if (left % 2 == 1) {
      unsigned long long possibleCount = 0;
      for (auto rightVal : gusu) {
        if ((rightVal.first ^ left) == curVal) {
          possibleCount++;
          rightVal.second--;
          if (checkPossibility(gusu, kisu, curVal, rightVal.first, firstLeft,
                               pos + 1, N)) {
            return true;
          }
          rightVal.second++;
        }
      }
      if (possibleCount == 0) {
        return false;
      }
    } else {
      unordered_map<unsigned long long, int>* targets[2] = {&gusu, &kisu};
      unsigned long long possibleCount = 0;
      for (auto target : targets) {
        for (auto rightVal : *target) {
          if ((rightVal.first ^ left) == curVal) {
            possibleCount++;
            rightVal.second--;
            if (checkPossibility(gusu, kisu, curVal, rightVal.first, firstLeft,
                                 pos + 1, N)) {
              return true;
            }
            rightVal.second++;
          }
        }
      }
      if (possibleCount == 0) {
        return false;
      }
    }
  }
  return false;
}
int main() {
  unsigned long long N;
  cin >> N;
  std::vector<unsigned long long> weights(N);
  unordered_map<unsigned long long, int> gusu;
  unordered_map<unsigned long long, int> kisu;
  unsigned long long gusuCount = 0, kisuCount = 0;
  for (unsigned long long i = 0; i < N; i++) {
    cin >> weights[i];
    if (weights[i] % 2 == 0) {
      gusuCount++;
      gusu[weights[i]] += 1;
    } else {
      kisuCount++;
      kisu[weights[i]] += 1;
    }
  }
  if (kisuCount >= 1) {
    if (N % 2 == 1) {
      if (!(N / 2 + 1 == kisuCount && N / 2 == gusuCount)) {
        cout << "No" << endl;
        return 0;
      }
    } else {
    }
  }
  unsigned long long firstVal = 0;
  if (kisu.size() > 0) {
    firstVal = kisu.begin()->first;
    kisu.begin()->second--;
  } else {
    firstVal = gusu.begin()->first;
    gusu.begin()->second--;
  }
  for (unsigned long long i = 0; i < N - 1; i++) {
    unsigned long long left = weights[i];
    if (kisu[left] == 0 && gusu[left] == 0) {
      continue;
    }
    if (left % 2 == 0) {
      gusu[left]--;
    } else {
      kisu[left]--;
    }
    if (checkPossibility(gusu, kisu, left, firstVal, left, 0, N)) {
      cout << "Yes" << endl;
      return 0;
    }
    if (left % 2 == 0) {
      gusu[left]++;
    } else {
      kisu[left]++;
    }
  }
  cout << "No" << endl;
  return 0;
}
