#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  int x;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] != 0) x = arr[i];
  }
  if (n == 3) {
    if (arr[0] == (arr[1] ^ arr[2])) {
      cout << "Yes\n";
    } else
      cout << "No\n";
    return 0;
  }
  map<int, int> m;
  for (int i : arr) m[i]++;
  if (m.size() > 2) {
    cout << "No\n";
  } else if (m.size() == 2) {
    if (n % 2) {
      if (m[0] == n / 2)
        cout << "Yes\n";
      else
        cout << "No\n";
    } else {
      cout << "No\n";
    }
  } else {
    if (m[0] == n)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
