#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return x * f;
}
const int N = 100010, LOG = 60;
queue<long long> q[LOG];
long long ans[N];
int main() {
  int n = read();
  for (int i = 1; i <= n; ++i) {
    long long t = read();
    for (long long j = 0; j < LOG; ++j) {
      if (!(t >> (j + 1ll))) {
        q[j].push(t);
        break;
      }
    }
  }
  long long now = 0;
  bool ok = 1;
  for (int i = 1; i <= n; ++i) {
    bool gfg = 0;
    for (long long j = 0; j < LOG; ++j) {
      if (!(now & (1ll << j)) && !q[j].empty()) {
        ans[i] = q[j].front();
        q[j].pop();
        now ^= ans[i];
        gfg = 1;
        break;
      }
    }
    if (!gfg) {
      ok = 0;
      break;
    }
  }
  if (!ok)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 1; i <= n; ++i) printf("%I64d ", ans[i]);
  }
  return 0;
}
