#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N], size;
map<int, int> C;
class FileInputOutput {
 private:
  static const int S = 1 << 21;
  char Fin[S], *A, *B;

 public:
  template <typename T>
  inline void read(T& x) {
    x = 0;
    char ch;
    while (!isdigit(
        ch = (A == B && (B = (A = Fin) + fread(Fin, 1, S, stdin), A == B)
                  ? EOF
                  : *A++)))
      ;
    while (x = (x << 3) + (x << 1) + (ch & 15),
           isdigit(
               ch = (A == B && (B = (A = Fin) + fread(Fin, 1, S, stdin), A == B)
                         ? EOF
                         : *A++)))
      ;
  }
} F;
int main() {
  register int i;
  for (F.read(n); i <= n; ++i)
    F.read(a[i]), (!C.count(a[i])) && (++size), ++C[a[i]];
  if (size != 3) return puts("No"), 0;
  pair<int, int> a = *C.begin();
  C.erase(C.begin());
  pair<int, int> b = *C.begin();
  C.erase(C.begin());
  pair<int, int> c = *C.begin();
  C.erase(C.begin());
  if ((a.first ^ b.first) != c.first) return puts("No"), 0;
  if (a.second != b.second || a.second != c.second)
    puts("No");
  else
    puts("Yes");
  return 0;
}
