#include <bits/stdc++.h>
using namespace std;
const int LG = 62;
vector<vector<long long int> > a(LG);
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long int x;
    scanf("%lld", &x);
    for (int j = LG; j >= 0; j--) {
      if (x & (1LL << j)) {
        a[j].push_back(x);
        break;
      }
    }
  }
  vector<long long int> res;
  for (int i = LG - 1; i >= 0; i--) {
    if (a[i].empty()) continue;
    vector<long long int> pRes;
    pRes.push_back(a[i].back()), a[i].pop_back();
    for (long long int x : res) {
      pRes.push_back(x);
      if (!a[i].empty() && (x & (1LL << i)))
        pRes.push_back(a[i].back()), a[i].pop_back();
    }
    if (!a[i].empty()) {
      printf("No\n");
      return 0;
    }
    swap(res, pRes);
  }
  printf("Yes\n");
  for (long long int x : res) printf("%lld ", x);
  printf("\n");
  return 0;
}
