#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 50;
long long a[M], b[M] = {0};
int main() {
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int s;
    cin >> s;
    if (s != 0) a[ans++] = s;
  }
  if (ans == 3 && (a[0] ^ a[1]) == a[2] || ans == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
