#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;
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 {
      if (N % 4 == 0) {
        cout << "No" << endl;
        return 0;
      }
      if ((N + 2) / 2 != kisuCount) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  unsigned long long firstVal = 0;
  if (kisu.size() > 0) {
    firstVal = kisu.begin()->first;
    kisu.begin()->second--;
  } else {
    firstVal = gusu.begin()->first;
    gusu.begin()->second--;
  }
  unsigned long long curVal = firstVal;
  unsigned long long firstLeft = INVALID_DIGIT;
  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 (i == N - 2) {
      if (firstLeft == INVALID_DIGIT) {
        for (unsigned long long j = 0; j < N; j++) {
          unsigned long long candidate = weights[j];
          if (kisu[candidate] == 0 && gusu[candidate] == 0) {
            continue;
          }
          firstLeft = candidate;
          break;
        }
        if (firstLeft == INVALID_DIGIT) {
          cout << "No" << endl;
          return 0;
        }
      }
      if ((firstLeft ^ left) == curVal) {
        cout << "Yes" << endl;
        return 0;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
    unsigned long long right = INVALID_DIGIT;
    for (unsigned long long rightIdx = 0; rightIdx < N; rightIdx++) {
      unsigned long long rightCandidate = weights[rightIdx];
      if (kisu[rightCandidate] == 0 && gusu[rightCandidate] == 0) {
        continue;
      }
      if ((left ^ rightCandidate) == curVal) {
        right = rightCandidate;
        if (right % 2 == 0) {
          gusu[right]--;
        } else {
          gusu[left]--;
        }
        break;
      }
    }
    if (right == INVALID_DIGIT) {
      cout << "No" << endl;
      return 0;
    }
    if (right % 2 == 0) {
      gusu[right]--;
    } else {
      kisu[right]--;
    }
    if (firstLeft == INVALID_DIGIT) {
      firstLeft = left;
    }
    left = curVal;
    curVal = right;
  }
  return 0;
}
