#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long Hashimoto = 0;
  bool Kanna = 1;
  char I_Love = getchar();
  while (I_Love < '0' || I_Love > '9') {
    if (I_Love == '-') Kanna = 0;
    I_Love = getchar();
  }
  while (I_Love >= '0' && I_Love <= '9') {
    Hashimoto = Hashimoto * 10 + I_Love - '0';
    I_Love = getchar();
  }
  return (Kanna ? Hashimoto : -Hashimoto);
}
template <typename T1, typename T2>
inline void Umax(T1 &a, T2 b) {
  if (a < b) a = b;
}
template <typename T1, typename T2>
inline void Umin(T1 &a, T2 b) {
  if (a > b) a = b;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  int a[11];
  cin >> n;
  for (int i = 0; i < (n); ++i) cin >> a[i];
  sort(a, a + n);
  for (int i = 1; i < (n - 1); ++i)
    if (a[i] != (a[i - 1] ^ a[i + 1])) {
      cout << "No\n";
      return 0;
    }
  if (a[0] != (a[1] ^ a[n - 1])) {
    cout << "No\n";
    return 0;
  }
  if (a[n - 1] != (a[n - 2] ^ a[0])) {
    cout << "No\n";
    return 0;
  }
  cout << "Yes\n";
  return 0;
}
