#include <bits/stdc++.h>
using namespace std;
long long n, h[100005];
long long dp[100005];
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
stack<long long> sta;
queue<long long> que;
set<string> s_set;
int main() {
  long long A, B, C, D, E, F, G, H, I, J, L, N, M, K, O,
      pair<long long, long long>, Q, R, S, T, U, V, W, X, Y, Z;
  long long ans;
  ans = 0;
  string s;
  long long sum, sum1, sum2, sum3, sum4;
  sum = sum1 = sum2 = sum3 = sum4 = 0;
  long long flg, flg1, cnt, cnt1, cnt2, cnt3, cnt4;
  flg = flg1 = cnt = cnt1 = cnt2 = cnt3 = cnt4 = 0;
  long long max;
  long long max1;
  max = max1 = 0;
  long long min;
  long long min1;
  min = min1 = 1000000000;
  long long work, work1, work2, work3, work4;
  work = work1 = work2 = work3 = work4 = 0;
  std::cin >> N;
  std::vector<long long> v(N);
  for (long long i = 0; i < N; i++) {
    std::cin >> v[i];
  }
  if (N >= 4) {
    for (long long i = 0; i < N; i++) {
      if (v[i] != 0) {
        puts("No");
        return 0;
      }
      if (i == N - 1) {
        puts("Yes");
        return 0;
      }
    }
  }
  if (v[0] == v[2] ^ v[1] && v[1] == v[0] ^ v[2] && v[2] == v[1] ^ v[0]) {
    puts("Yes");
    return 0;
  } else {
    puts("No");
  }
  return 0;
}
