#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1e9 + 7;
long long int INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k = 0, l = 0, r = 0, m = 0, n, p = 0, cnt = 0, cnt1 = 0,
                      x, y, z = 0, a, b, low, mid, high, ans = 0, maxi = 0,
                      mini = INF, t;
  cin >> n;
  long long int A[n];
  for (i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] == 0) cnt++;
  }
  if (cnt == n)
    cout << "Yes\n";
  else if (n == 3) {
    if (A[0] ^ A[1] ^ A[2] == 0)
      cout << "Yes\n";
    else
      cout << "No\n";
  } else
    cout << "No\n";
}
