#include <bits/stdc++.h>
using namespace std;
int clz(unsigned long long N) {
  return N ? 64 - __builtin_clzll(N) : -200000000;
}
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  vector<long long> b(n);
  for (int i = 0; i < (n); i++) cin >> b[i];
  sort(b.begin(), b.end());
  vector<vector<long long> > ra(70, vector<long long>());
  for (int i = 0; i < (n); i++) {
    int r = clz(b[i]);
    ra[r].push_back(b[i]);
  }
  int cR = 1;
  long long curr = 0;
  while (ra[cR].size() == 0) {
    cR++;
  }
  vector<long long> ans;
  curr = ra[cR][0];
  ans.push_back(ra[cR][0]);
  ra[cR].erase(ra[cR].begin());
  while (ans.size() < n) {
    bool f = 0;
    long long t = curr;
    int i = 1;
    while (t) {
      while (t % 2 == 1) {
        t = t >> 1;
        i++;
      }
      if (ra[i].size()) {
        ans.push_back(ra[i][0]);
        curr = curr ^ ra[i][0];
        ra[i].erase(ra[i].begin());
        f = 1;
        cR = max(cR, i);
        break;
      } else {
        t >>= 1;
        i++;
      }
    }
    if (f) {
    } else {
      cR++;
      while (cR <= 64 && ra[cR].size() == 0) cR++;
      if (cR == 65) {
        break;
      } else {
        ans.push_back(ra[cR][0]);
        curr = curr ^ ra[cR][0];
        ra[cR].erase(ra[cR].begin());
      }
    }
  }
  if (ans.size() == n) {
    cout << "Yes\n";
    for (int i = 0; i < (n); i++) cout << ans[i] << " ";
  } else
    cout << "No";
}
