#include <bits/stdc++.h>
using namespace std;
void rd(int& u) { scanf("%d", &u); }
void rd2(int& u, int& v) { scanf("%d%d", &u, &v); }
void rd3(int& u, int& v, int& w) { scanf("%d%d%d", &u, &v, &w); }
void ptn(int u) { printf("%d\n", u); }
void pte(int u) { printf("%d ", u); }
const int N = 100000 + 5;
long long n, a[N];
long long ans[N];
vector<long long> v[70];
int main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    for (long long j = 60; j >= 0; j--)
      if (a[i] & (1LL << j)) {
        v[j].push_back(a[i]);
        break;
      }
  }
  long long now = 0;
  for (long long i = 1; i <= n; i++) {
    bool ok = 0;
    for (long long j = 0; j <= 60; j++)
      if (!(now & (1LL << j))) {
        if (v[j].empty()) continue;
        ans[i] = v[j].back();
        v[j].pop_back();
        now ^= ans[i];
        ok = 1;
        break;
      }
    if (!ok) return puts("No"), 0;
  }
  puts("Yes");
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
