#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 15;
const int inf = (long long)0x3f3f3f3f;
const int MOD = (int)998244353;
long long a[N], b[N];
vector<long long> vec[65];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < 65; i++) {
      vec[i].clear();
    }
    long long sum = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%lld", &b[i]);
      sum ^= b[i];
      for (int j = 60; j >= 0; j--) {
        if (b[i] >> j & 1) {
          vec[j].push_back(b[i]);
          break;
        }
      }
    }
    for (int i = n; i >= 2; i--) {
      int k = -1;
      for (int j = 0; j <= 60; j++) {
        if ((sum >> j & 1) && !vec[j].empty()) {
          k = j;
          break;
        }
      }
      if (k == -1) {
        goto GG;
      }
      a[i] = vec[k].back();
      vec[k].pop_back();
      sum ^= a[i];
    }
    a[1] = sum;
    puts("Yes");
    for (int i = 1; i <= n; i++) {
      printf("%lld ", a[i]);
    }
    puts("");
    continue;
  GG:
    puts("No");
  }
}
