#include <bits/stdc++.h>
const int maxn = 1e5 + 100, NUM = 61;
const int maxS = maxn * NUM;
int Next[maxS][2];
int cnt[maxS];
long long val[maxS];
int C = 0;
int n;
long long xorsum = 0;
int Root = 0;
long long ans[maxn];
int new_node() {
  Next[C][0] = Next[C][1] = -1;
  cnt[C] = 0;
  return C++;
}
void Trie_Ins(long long x) {
  int p = Root;
  for (int i = NUM - 1; i >= 0; i--) {
    int id = (x >> i) & 1;
    if (Next[p][id] == -1) Next[p][id] = new_node();
    p = Next[p][id];
    cnt[p]++;
  }
  val[p] = x;
}
bool query(long long xorsum, long long &res, int p, bool limit, int dep) {
  if (p != Root && (!cnt[p] || p == -1)) return false;
  if (dep == -1) {
    res = val[p];
    cnt[p]--;
    return true;
  }
  int id = (xorsum >> dep) & 1;
  if (id == 0) {
    bool ret = (!limit && query(xorsum, res, Next[p][1], limit, dep - 1)) ||
               query(xorsum, res, Next[p][0], limit, dep - 1);
    if (!ret) return false;
    cnt[p]--;
    return true;
  } else {
    bool ret = query(xorsum, res, Next[p][0], limit, dep - 1) ||
               (query(xorsum, res, Next[p][1], false, dep - 1));
    if (!ret) return false;
    cnt[p]--;
    return true;
  }
}
void solve() {
  for (int i = n - 1; i >= 0; i--) {
    long long res;
    bool ret = query(xorsum, res, Root, true, NUM - 1);
    if (!ret) {
      puts("No");
      return;
    }
    ans[i] = res;
    assert(xorsum > (xorsum ^ res));
    xorsum ^= res;
  }
  puts("Yes");
  for (int i = 0; i < n; i++) printf("%I64d ", ans[i]);
  puts("");
}
int main() {
  scanf("%d", &n);
  Root = new_node();
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%I64d", &x);
    Trie_Ins(x);
    xorsum ^= x;
  }
  solve();
  return 0;
}
