#include <bits/stdc++.h>
using namespace std;
void qmax(long long &x, long long y) {
  if (x < y) x = y;
}
void qmin(long long &x, long long y) {
  if (x > y) x = y;
}
inline long long read() {
  char s;
  long long k = 0, base = 1;
  while ((s = getchar()) != '-' && s != EOF && !(isdigit(s)))
    ;
  if (s == EOF) exit(0);
  if (s == '-') base = -1, s = getchar();
  while (isdigit(s)) {
    k = k * 10 + (s ^ '0');
    s = getchar();
  }
  return k * base;
}
inline void write(long long x) {
  static char cnt, num[15];
  cnt = 0;
  if (!x) {
    printf("0");
    return;
  }
  for (; x; x /= 10) num[++cnt] = x % 10;
  for (; cnt; putchar(num[cnt--] + 48))
    ;
}
long long n, l[70], x, f[70], ans[2001010];
vector<long long> a[70];
long long flag;
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) {
    x = read();
    for (long long i = 59; i >= 0; i--) {
      if (x & (1ll << i)) {
        a[i].push_back(x);
        l[i]++;
        break;
      }
    }
  }
  long long lst = 0;
  for (long long i = 0; i < 60; i++)
    if (l[i] != 0) sort(a[i].begin(), a[i].end());
  for (long long j = 1; j <= n; j++) {
    flag = 0;
    for (long long i = 0; i < 60; i++) {
      if (f[i] == l[i]) continue;
      if (((lst >> (long long)i) & 1ll) != 0) continue;
      f[i]++;
      ans[j] = a[i][f[i] - 1];
      flag = 1;
      lst ^= ans[j];
      break;
    }
    if (!flag) break;
  }
  if (!flag) {
    printf("No");
    return 0;
  }
  printf("Yes\n");
  for (long long i = 1; i <= n; i++) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
