#include <bits/stdc++.h>
using namespace std;
int n;
long long b[100010];
vector<long long> h[70];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &b[i]);
  for (int i = 1; i <= n; i++) {
    int x = 60;
    while (!((b[i] >> x) & 1)) x--;
    h[x].push_back(b[i]);
  }
  vector<long long> ans;
  for (int i = 59; i >= 0; i--)
    if (!h[i].empty()) {
      vector<long long> rans;
      rans.push_back(h[i][0]);
      int pos = 0;
      for (int j = 1; j < h[i].size(); j++) {
        while (pos < ans.size() && ((ans[pos] >> i) & 1) == 0) {
          rans.push_back(ans[pos++]);
        }
        if (pos == ans.size()) {
          puts("No");
          return 0;
        }
        rans.push_back(ans[pos++]);
        rans.push_back(h[i][j]);
      }
      while (pos < ans.size()) rans.push_back(ans[pos++]);
      ans = rans;
      cout << endl;
    }
  puts("Yes");
  long long y = 0;
  for (long long x : ans) {
    cout << x << " ";
  }
}
