#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1ll << 61;
long long a[100006];
signed main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  if (n == 3) {
    long long flg = 0;
    for (long long i = 0; i < 3; i++) {
      if (a[i] ^ a[(i + 2) % 3] == a[(i + 1) % 3]) flg++;
    }
    if (flg == 3)
      puts("Yes");
    else
      puts("No");
  } else {
    long long flg = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] != 0) flg++;
    }
    if (!flg)
      puts("Yes");
    else
      puts("No");
  }
}
