#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long a[N], as, b[N];
int n;
vector<long long> v[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    int x = 0;
    for (int j = 0; j < 61; j++)
      if (a[i] >> j & 1) x = j;
    v[x].push_back(a[i]);
  }
  for (int i = 1; i <= n; i++) {
    int f = 0;
    for (int j = 0; j < 61; j++) {
      if (v[j].size() && !(as >> j & 1)) {
        b[i] = *(--v[j].end());
        v[j].pop_back();
        f = 1;
        break;
      }
    }
    if (!f) return printf("No\n"), 0;
    as ^= b[i];
  }
  printf("Yes\n");
  for (int i = 1; i <= n; i++) printf("%lld ", b[i]);
  printf("\n");
}
