#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
const int BN = 60;
queue<long long> qbs[BN];
list<long long> as;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long b;
    scanf("%lld", &b);
    int k = BN - 1;
    while (!((b >> k) & 1)) k--;
    qbs[k].push(b);
  }
  for (int k = BN - 1; k >= 0; k--) {
    queue<long long> &qbk = qbs[k];
    if (qbk.empty()) continue;
    long long bk = 1LL << k, t = 0;
    for (list<long long>::iterator lit = as.begin(); !qbk.empty(); lit++) {
      if (t == 0) {
        as.insert(lit, qbk.front());
        qbk.pop();
        t = bk;
      }
      if (lit == as.end()) break;
      if ((*lit & bk) != 0) t ^= bk;
    }
    if (!qbk.empty()) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  bool cont = false;
  for (list<long long>::iterator lit = as.begin(); lit != as.end(); lit++) {
    if (cont) putchar(' ');
    printf("%lld", *lit);
    cont = true;
  }
  putchar('\n');
  return 0;
}
