#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1000000000000000;
vector<pair<long long, long long>> vec[200010], peo[200010];
long long bit[100010], num;
long long par[100010], sz[100010];
long long n, a[100010];
map<long long, long long> mp;
struct edge {
  long long to, cost;
};
long long V;
vector<edge> G[300010];
long long d[300010];
long long root(int x) {
  if (par[x] == x) return x;
  return par[x] = root(par[x]);
}
void unite(int x, int y) {
  int rx = root(x);
  int ry = root(y);
  if (rx == ry) return;
  par[rx] = ry;
}
bool same(int x, int y) {
  int rx = root(x);
  int ry = root(y);
  return rx == ry;
}
void dijkstra(long long s) {
  priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
                 greater<pair<long long, long long>>>
      que;
  for (int i = 0; i <= 300010; i++) {
    d[i] = INF;
  }
  d[s] = 0;
  que.push(pair<long long, long long>(0, s));
  while (!que.empty()) {
    pair<long long, long long> p = que.top();
    que.pop();
    long long v = p.second;
    if (d[v] < p.first) continue;
    for (long long i = 0; i < G[v].size(); i++) {
      edge e = G[v][i];
      if (d[e.to] > d[v] + e.cost) {
        d[e.to] = d[v] + e.cost;
        que.push(pair<long long, long long>(d[e.to], e.to));
      }
    }
  }
}
long long sum(long long i) {
  long long s = 0;
  while (i > 0) {
    s += bit[i];
    i -= i & -i;
  }
  return s;
}
void add(long long i, long long x) {
  while (i <= num) {
    bit[i] += x;
    i += i & -i;
  }
}
long long po(long long x, long long y) {
  if (y == 0) return 1;
  if (y % 2) {
    return po(x, y - 1) * x % mod;
  } else {
    long long yyy = po(x, y / 2);
    return yyy * yyy % mod;
  }
}
long long pow_mod(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y % 2 == 1) {
      (res *= x) %= mod;
    }
    (x *= x) %= mod;
    y /= 2;
  }
  return res;
}
long long div(long long x) { return po(x, mod - 2); }
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  bool ans = true;
  if (mp.size() != 3) {
    cout << "No" << endl;
    return 0;
  }
  long long A[4], B[4];
  long long i = 0;
  for (auto itr = mp.begin(); itr != mp.end(); ++itr) {
    A[i] = itr->first;
    B[i] = itr->second;
    i++;
  }
  if ((A[0] ^ A[1]) == A[2] && B[0] == B[1] && B[1] && B[2]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  int www;
  cin >> www;
}
