#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
vector<long long> ans, newAns;
long long a[MAX_N];
vector<long long> b[105];
int cur[105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; (i) < (n); ++i) scanf("%lld", &a[i]);
  for (int i = 0; (i) < (n); ++i) {
    for (int j = (60) - 1; (j) >= 0; --j)
      if ((a[i] >> j) & 1) {
        b[j].push_back(a[i]);
        break;
      }
  }
  for (int i = (60) - 1; (i) >= 0; --i) {
    if ((int)((b[i]).size()) > 1 + cur[i]) {
      puts("No");
      return 0;
    }
    for (long long k : b[i])
      for (int j = 0; (j) < (60); ++j)
        if ((k >> j) & 1) cur[j]++;
    newAns.clear();
    int ind = 0;
    if (ind < (int)((b[i]).size())) newAns.push_back(b[i][0]), ind++;
    for (long long k : ans) {
      newAns.push_back(k);
      if (((k >> i) & 1) && ind < (int)((b[i]).size()))
        newAns.push_back(b[i][ind++]);
    }
    ans = newAns;
  }
  puts("Yes");
  for (long long k : ans)
    printf(
        "%lld"
        " ",
        k);
  return 0;
}
