#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5;
const long long M = 1e4;
const long long mod = 1e9 + 7;
const long long inf = 1e9;
long long read() {
  long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  s = (neg ? -s : s);
  return s;
}
long long a, s[N + 5], r[N + 5];
long double val[N + 5];
vector<long long> p[63], q[63];
bool cmp(long long p1, long long p2) { return val[p1] < val[p2]; }
signed main() {
  a = read();
  for (long long i = (1); i <= (a); ++i) {
    s[i] = read();
    long long j = 0, x = s[i];
    for (; x; ++j)
      if (x & (1ll << j)) {
        if ((x ^ (1ll << j))) q[j].push_back(i);
        x ^= (1ll << j);
      }
    --j;
    p[j].push_back(i);
  }
  long long L = 0;
  for (long long i = (61); i >= (0); --i) {
    if (!((long long)((p[i]).size()))) continue;
    if (((long long)((p[i]).size())) > ((long long)((q[i]).size())) + 1) {
      puts("No");
      return 0;
    }
    sort(q[i].begin(), q[i].end(), cmp);
    r[p[i][0]] = L;
    val[p[i][0]] = val[L] - 1e18;
    L = p[i][0];
    for (long long j = (1); j <= (((long long)((p[i]).size())) - 1); ++j) {
      long long k = p[i][j], t = q[i][j - 1];
      val[k] = (val[t] + val[r[t]]) / 2;
      r[k] = r[t];
      r[t] = k;
    }
  }
  puts("Yes");
  for (long long i = L; i; i = r[i]) printf("%lld ", s[i]);
  return 0;
}
