#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
using Pii = pair<int, int>;
constexpr ll MOD = 1000000007;
constexpr long double EPS = 1e-10;
constexpr int dyx[4][2] = {{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  set<int> st;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    ++mp[a[i]];
    st.insert(a[i]);
  }
  if (n == 3) {
    cout << (((a[0] ^ a[1]) == a[2]) ? "Yes\n" : "No\n");
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
