#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &ans) {
  T f = 1;
  char c = getchar();
  ans = 0;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    ans = ans * 10 + c - '0';
    c = getchar();
  }
  ans *= f;
}
long long n, x, ff[1000010], f[1000010], cur, flag;
vector<long long> z[100];
signed main() {
  read(n);
  for (long long i = 0; i < 60; i++) z[i].push_back(0);
  for (long long l = 1; l <= n; l++) {
    read(x);
    for (long long i = 59; i >= 0; i--)
      if ((x >> i) & 1) {
        z[i][0]++;
        z[i].push_back(x);
        break;
      }
  }
  cur = 0;
  for (long long l = 1; l <= n; l++) {
    flag = 0;
    for (long long i = 0; i < 60; i++)
      if (((cur >> i) & 1) == 0 && z[i][0] != ff[i]) {
        ff[i]++;
        f[l] = z[i][ff[i]];
        flag = 1;
        cur ^= f[l];
        break;
      }
    if (!flag) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  for (long long i = 1; i <= n; i++) printf("%lld", f[i]), putchar(' ');
  puts("");
}
