#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = (int)1e9;
const int mod = (int)1e9 + 7;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (n); ++i) cin >> a[i];
  if (n > 3)
    cout << "No" << endl;
  else {
    if (a[0] xor a[1] == a[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
