#include <bits/stdc++.h>
using namespace std;
namespace flyinthesky {
int a[100000 + 5];
void clean() {}
int solve() {
  clean();
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  int x = 0, bj = 0;
  for (int i = 2; i <= n; ++i)
    if (a[i] != a[i - 1]) bj = 1;
  for (int i = 1; i <= n; ++i) x ^= a[i];
  if (!bj || (x == 0))
    puts("Yes");
  else
    puts("No");
  return 0;
}
}  // namespace flyinthesky
int main() {
  flyinthesky::solve();
  return 0;
}
