#include <bits/stdc++.h>
using namespace std;
namespace SHENZHEBEI {
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 - 48 + ch;
  return x * f;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = getchar();
  for (; isspace(ch); ch = getchar())
    ;
  return ch;
}
inline long long readstr(char *s) {
  char ch = getchar();
  int cur = 0;
  for (; isspace(ch); ch = getchar())
    ;
  for (; !isspace(ch); ch = getchar()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
inline double getreal() {
  static double lbc;
  scanf("%lf", &lbc);
  return lbc;
}
}  // namespace SHENZHEBEI
using namespace SHENZHEBEI;
long long n, x, ff[1000010], f[1000010], dd, ddd;
vector<long long> z[100];
signed main() {
  n = read();
  for (long long i = 0; i < 60; i++) z[i].push_back(0);
  for (long long l = 1; l <= n; l++) {
    x = read();
    for (long long i = 59; i >= 0; i--)
      if ((x >> i) & 1) {
        z[i][0]++;
        z[i].push_back(x);
        break;
      }
  }
  for (long long i = 0; i < 60; i++)
    if (z[i][0]) sort(&z[i][1], &z[i][z[i][0]]);
  dd = 0;
  for (long long l = 1; l <= n; l++) {
    ddd = 0;
    for (long long i = 0; i < 60; i++)
      if (((dd >> i) & 1) == 0 && z[i][0] != ff[i]) {
        ff[i]++;
        f[l] = z[i][ff[i]];
        ddd = 1;
        dd ^= f[l];
        break;
      }
    if (!ddd) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  for (long long i = 1; i <= n; i++) write(f[i]), putchar(' ');
  puts("");
}
