#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, ai, i, t = 0;
  cin >> n;
  vector<bool> ab(1e5 + 1, false);
  for (i = 0; i < n; i++) {
    cin >> ai;
    if (!ab.at(ai)) {
      t++;
      ab.at(ai) = true;
    }
  }
  if (t == 1 && ab.at(0)) {
    cout << "Yes" << endl;
    return 0;
  }
  if (t != 3) {
    cout << "No" << endl;
    return 0;
  }
  int a, b, c;
  vector<int> m;
  for (i = 0; i < 1e5 + 1; i++)
    if (ab.at(i)) m.push_back(i);
  for (i = 0; i < 100; i++) {
    a = (m.at(0) & (1 << i));
    b = (m.at(1) & (1 << i));
    c = (m.at(2) & (1 << i));
    if (a + b + c != 2 * (1 << i) && a + b + c != 0) break;
  }
  if (i == 100)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
