#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1000000000000000;
const long long inf = -1e18;
long long ma = 1000000000 + 7;
long long mx = 1000003;
long long h, w, n, m, k;
string s, t;
char maze[60][60];
int dis[101][101];
int graph[52][52];
bool vis[52];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
long long gcd(long long x, long long y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
long long lcm(long long a, long long b) {
  long long g = gcd(a, b);
  return a / g * b;
}
void comb(vector<vector<long long> >& v) {
  for (long long i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (long long k = 1; k < v.size(); k++) {
    for (int j = 1; j < k; j++) {
      v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]) % ma;
    }
  }
}
int main() {
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n != 3) {
    cout << "No" << endl;
  } else {
    if ((a[0] ^ a[1]) == a[2]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
