#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return rand(); }
inline int rnd(int x) { return myrand() % x; }
void precalc() {}
const int maxn = 1e5 + 10;
const int maxk = 61;
int n;
vector<long long> b[maxk];
bool read() {
  if (scanf("%d", &n) < 1) {
    return false;
  }
  for (int k = 0; k < maxk; ++k) {
    b[k].clear();
  }
  for (int i = 0; i < n; ++i) {
    long long x;
    scanf("%lld", &x);
    for (int k = maxk - 1; k >= 0; --k) {
      if ((x >> k) & 1) {
        b[k].push_back(x);
        break;
      }
    }
  }
  return true;
}
long long ans[maxn];
int p[maxn];
void solve() {
  long long s = 0;
  memset(p, 0, sizeof(p));
  for (int i = 0; i < n; ++i) {
    ans[i] = -1;
    for (int k = 0; k < maxk; ++k) {
      if (((s >> k) & 1) == 0 && p[k] < ((int)(b[k]).size())) {
        ans[i] = b[k][p[k]];
        s ^= b[k][p[k]];
        ++p[k];
        break;
      }
    }
    if (ans[i] == -1) {
      printf("No\n");
      return;
    }
  }
  printf("Yes\n");
  for (int i = 0; i < n; ++i) {
    printf(
        "%lld"
        "%c",
        ans[i], " \n"[i == n - 1]);
  }
}
int main() {
  srand(rdtsc());
  precalc();
  while (true) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
