#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
void chmin(T &a, const T &b) noexcept {
  if (b < a) a = b;
}
template <class T>
void chmax(T &a, const T &b) noexcept {
  if (a < b) a = b;
}
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << H << " ";
  debug_out(T...);
}
int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::cout << std::fixed << std::setprecision(15);
  int n;
  cin >> n;
  if (n != 3) {
    cout << "No\n";
    return 0;
  }
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  bool ok = true;
  int idx[3][2] = {{1, 2}, {0, 2}, {0, 1}};
  for (int i = 0; i < (3); ++i) {
    ;
    if (((a[idx[i][0]]) ^ (a[idx[i][1]])) != a[i]) ok = false;
  }
  if (ok)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
