#include <bits/stdc++.h>
using namespace std;
int arr[100010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int len, zeroNum = 0;
  cin >> len;
  for (int i = 0; i < len; i++) {
    cin >> arr[i];
    zeroNum += (arr[i] == 0);
  }
  if (len > 3)
    cout << (zeroNum == len ? "Yes\n" : "No\n");
  else
    cout << (((arr[0] ^ arr[1]) == arr[2] || (arr[0] ^ arr[2]) == arr[1] ||
              (arr[1] ^ arr[2]) == arr[0])
                 ? "Yes\n"
                 : "No\n");
  return 0;
}
