#include <bits/stdc++.h>
using namespace std;
constexpr int mod = 1000000007;
constexpr int mod1 = 998244353;
vector<int> dx = {0, -1, 0, 1}, dy = {1, 0, -1, 0};
bool inside(int y, int x, int h, int w) {
  if (y < h && y >= 0 && x < w && x >= 0) return true;
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a.at(i);
  if (n == 3) {
    if ((a.at(0) ^ a.at(1) ^ a.at(2)) == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    bool flg = true;
    for (int i = 0; i < (n); ++i)
      if (a.at(i) == 0) flg = false;
    if (flg)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
