#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void Cin(T &x) {
  char c;
  T sign = 1;
  x = 0;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sign;
}
const int N = 1e6 + 7;
const int M = 1e5 + 7;
const long double pi = 3.1415926535897;
long long a[N], n, res[N], cur;
vector<long long> v[70];
int LastBit(long long x) {
  int res = 0;
  while (x) {
    x >>= 1;
    ++res;
  }
  return res - 1;
}
void Enter() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    v[LastBit(a[i])].push_back(a[i]);
  }
}
bool Get(long long x, long long i) { return x & (1ll << i); }
void Solve() {
  cur = 0;
  for (int i = 1; i <= n; ++i) {
    bool flag = 0;
    for (int j = 0; j <= 60; ++j) {
      if (Get(cur, j) || v[j].empty()) continue;
      res[i] = v[j].back();
      cur ^= res[i];
      v[j].pop_back();
      flag = 1;
      break;
    }
    if (!flag) {
      cout << "No";
      exit(0);
    }
  }
  cout << "Yes\n";
  for (int i = 1; i <= n; ++i) cout << res[i] << ' ';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  Enter();
  Solve();
  return 0;
}
