#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  if (N % 3 > 0) {
    cout << "No" << endl;
    return 0;
  }
  sort(a.begin(), a.end());
  int ex2 = log2(a[N - 1]) + 1;
  bool res = false;
  for (int i = 0; i < N - 1; i++) {
    for (int j = 0; j < N - 1; j++) {
      if (i == j) continue;
      if ((a[N - 1] ^ a[i]) == a[j]) {
        res = true;
        cout << a[i] << ' ' << a[j] << endl;
      }
    }
  }
  if (!res) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < ex2; i++) {
    int num0 = 0;
    int num1 = 0;
    for (int i = 0; i < N; i++) {
      if (a[i] % 2 == 0)
        num0++;
      else
        num1++;
      a[i] = a[i] / 2;
    }
    if (!(num0 * 2 == num1 || num0 == num1 * 2)) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
