#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> m;
int nums[200005];
int main() {
  int n;
  bool flag = true;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &nums[i]);
    if (m.find(nums[i]) == m.end())
      m.insert({nums[i], 1});
    else {
      m[nums[i]]++;
    }
    if (nums[i] != 0) flag = false;
  }
  if (flag) {
    printf("Yes");
    return 0;
  }
  int ans = 0;
  if (n > 3) {
    if (n % 3 == 0) {
      if (m.size() > 3) {
        printf("No");
        return 0;
      } else {
        for (auto i : m) {
          while (i.second != 0) {
            ans ^= i.first;
            i.second -= n / 3;
          }
        }
      }
      if (ans == 0) {
        printf("Yes");
        return 0;
      } else {
        printf("No");
        return 0;
      }
    } else {
      printf("No");
      return 0;
    }
  } else {
    if ((nums[0] ^ nums[1]) == nums[2]) {
      printf("Yes");
      return 0;
    } else {
      printf("No");
      return 0;
    }
  }
  return 0;
}
