#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <typename T>
inline void uin(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
inline void uax(T &a, T b) {
  if (b > a) a = b;
}
const long long maxn = 100 * 1000 + 228;
long long a[maxn], kek[maxn];
vector<long long> g[100];
long long get_hb(long long A) {
  for (long long bit = 59; bit >= 0; --bit) {
    if ((1LL << bit) <= A) {
      return bit;
    }
  }
  return 0;
}
signed main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= (long long)n; ++i) {
    cin >> a[i];
    g[get_hb(a[i])].push_back(a[i]);
  }
  long long xr = 0;
  for (long long i = 1; i <= (long long)n; ++i) {
    long long lol = -1;
    for (long long bit = 0; bit < 60; ++bit) {
      if (!((xr >> bit) & 1) && !g[bit].empty()) {
        lol = g[bit].back();
        g[bit].pop_back();
        break;
      }
    }
    if (lol == -1) {
      cout << "No\n";
      return 0;
    }
    kek[i] = lol;
    xr ^= lol;
  }
  cout << "Yes\n";
  for (long long i = 1; i <= (long long)n; ++i) {
    cout << kek[i] << " ";
  }
  cout << "\n";
  return 0;
}
