#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
vector<long long> ans, temp, hui;
long long a[MAXN];
long long getPow(long long x) {
  long long p = (1LL << 60);
  while (p > x) {
    p /= 2;
  }
  return p;
}
void Merge(long long pow) {
  int l = 0;
  long long v = 0;
  for (int i = 0; i < ans.size(); i++) {
    if (l == temp.size()) {
      hui.push_back(ans[i]);
      continue;
    }
    if (v == 0) {
      hui.push_back(temp[l]);
      l++;
      v = 1;
    }
    if ((ans[i] & pow) != 0) v ^= 1;
    hui.push_back(ans[i]);
  }
  if (v == 0 && l < temp.size()) {
    hui.push_back(temp[l]);
    l++;
    v = 1;
  }
  if (l != temp.size()) {
    printf("No\n");
    exit(0);
  }
  ans.clear();
  for (long long x : hui) {
    ans.push_back(x);
  }
}
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    scanf("%I64d", a + i);
  }
  sort(a, a + N);
  reverse(a, a + N);
  int l = 0;
  while (l < N) {
    temp.clear();
    hui.clear();
    long long pow = getPow(a[l]);
    int r = l;
    while (r < N && (a[r] & pow) != 0) {
      temp.push_back(a[r]);
      r++;
    }
    Merge(pow);
    l = r;
  }
  printf("Yes\n");
  for (int i = 0; i < N; i++) {
    printf("%I64d ", ans[i]);
  }
  return 0;
}
