#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n;
long long b[N];
vector<long long> bit[62];
vector<long long> ans;
int highest(long long x) {
  int i = 0;
  while (x >= (1LL << i)) i++;
  return i - 1;
}
void resort() {
  sort(b, b + n);
  for (int i = n - 1; i >= 0; i--) {
    bit[highest(b[i])].push_back(b[i]);
  }
  long long now = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= 60; j++) {
      if (!((now >> j) & 1) && !bit[j].empty()) {
        ans.push_back(bit[j].back());
        now ^= bit[j].back();
        bit[j].pop_back();
        break;
      }
    }
    if (ans.size() != i + 1) {
      puts("No");
      return;
    }
  }
  puts("Yes");
  for (auto x : ans) {
    printf("%lld ", x);
  }
  puts("");
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &b[i]);
  }
  resort();
  return 0;
}
