#include <bits/stdc++.h>
using namespace std;
vector<long long> m[61];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    long long x;
    cin >> x;
    int idx = 63 - __builtin_clzll(x);
    m[idx].push_back(x);
  }
  vector<long long> order;
  long long curr = 0;
  while (true) {
    bool exit = true;
    for (int i = 0; i <= 60; i++)
      if ((curr & (1LL << i)) == 0 && m[i].size() != 0) {
        curr ^= m[i].back();
        order.push_back(m[i].back());
        m[i].pop_back();
        exit = false;
        break;
      }
    if (exit) break;
  }
  if (order.size() == N) {
    cout << "Yes" << endl;
    for (auto x : order) cout << x << " ";
    cout << endl;
  } else
    cout << "No" << endl;
  return 0;
}
