#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 << "No\n";
    return 0;
  }
  if (arr[0] ^ arr[1] == arr[2] || arr[0] ^ arr[2] == arr[1] ||
      arr[1] ^ arr[2] == arr[0])
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
