#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100000];
  bool f = true;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    f &= a[i] == 0;
  }
  cout << (n == 3 && (a[0] ^ a[1]) == a[2] || f ? "Yes" : "No") << endl;
}
