#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vi xs(n);
  for (auto& xi : xs) cin >> xi;
  if (n > 3 || (xs[0] ^ xs[1]) != xs[2])
    cout << "No\n";
  else
    cout << "Yes\n";
}
