#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const long long int MAX = -1000000000000000000;
const long long int MIN = 1000000000000000000;
const long long int inf = 1000000000;
const long long int KOK = 100000;
const long long int LOG = 30;
const long long int li = 500005;
const long long int mod = 1000000007;
long long int n, m, b[li], a[li], k, flag, t;
long long int cev;
string s;
vector<long long int> v;
int main(void) {
  scanf("%lld", &n);
  if (n > 3) {
    printf("No\n");
    return 0;
  }
  for (long long int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  if ((a[1] ^ a[3]) == a[2] && (a[1] ^ a[2]) == a[3] && (a[2] ^ a[3]) == a[1]) {
    printf("Yes\n");
    return 0;
  }
  printf("No\n");
  return 0;
}
