#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
const int infinity = (int)1e9 + 42;
const int64_t llInfinity = (int64_t)1e18 + 256;
const int module = (int)1e9 + 7;
const long double eps = 1e-8;
mt19937_64 randGen(system_clock().now().time_since_epoch().count());
inline void raiseError(string errorCode) {
  cerr << "Error : " << errorCode << endl;
  exit(42);
}
signed main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  const int bits = 62;
  vector<vector<int64_t> > byMaxBit(bits);
  for (int i = 0; i < n; i++) {
    int64_t val;
    cin >> val;
    int mBit = -1;
    for (int i = 0; i < bits; i++) {
      if ((val >> i) & 1) {
        mBit = i;
      }
    }
    byMaxBit[mBit].push_back(val);
  }
  int64_t ksor = 0;
  vector<int64_t> res;
  for (int i = 0; i < n; i++) {
    bool ok = false;
    for (int j = 0; j < bits; j++) {
      if (!byMaxBit[j].empty() && !((ksor >> j) & 1)) {
        res.push_back(byMaxBit[j].back());
        byMaxBit[j].pop_back();
        ksor ^= res.back();
        ok = true;
        break;
      }
    }
    if (!ok) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (int64_t it : res) {
    cout << it << " ";
  }
  cout << endl;
  return 0;
}
