#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1001001001001001LL;
const long long int MOD = 1000000007;
long long int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
long long int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};
signed main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 3) {
    bool flag = false;
    sort(a.begin(), a.end());
    do {
      if ((a[0] ^ a[2]) == a[1] and (a[1] ^ a[0]) == a[2] and
          (a[2] ^ a[1]) == a[0])
        flag = true;
    } while (next_permutation(a.begin(), a.end()));
    if (flag)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
