#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void Cin(T &x) {
  register char c;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    ;
  for (x = 0; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
}
const int nBits = 60;
int n, j;
long long b;
vector<long long> ans, v[nBits];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Cin(n);
  ans.resize(n);
  for (int i = 0; i < n; ++i) {
    Cin(b);
    v[63 - __builtin_clzll(b)].push_back(b);
  }
  long long a = 0;
  for (auto &b : ans) {
    for (j = 0; j < nBits; ++j) {
      if (a >> j & 1 || v[j].empty()) continue;
      b = v[j].back();
      v[j].pop_back();
      a ^= b;
      break;
    }
    if (j == nBits) return cout << "No", 0;
  }
  cout << "Yes\n";
  for (auto &b : ans) cout << b << ' ';
  return 0;
}
