#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  bool ans = true;
  if (n == 3) {
    int a, b, c;
    cin >> a >> b >> c;
    ans = (a == b ^ c && b == c ^ a && c == a ^ b);
  } else
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      if (a != 0) ans = false;
    }
  puts(ans ? "Yes" : "No");
  return 0;
}
