#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10, LOG = 60;
int n, go[maxn * LOG][2], cnt[maxn * LOG], sz;
vector<long long> ans;
int newNode() {
  go[sz][0] = go[sz][1] = -1;
  return sz++;
}
void Add(long long x) {
  int v = 0;
  cnt[v]++;
  for (int i = LOG - 1; i >= 0; i--) {
    int y = x >> i & 1;
    if (go[v][y] == -1) go[v][y] = newNode();
    v = go[v][y];
    cnt[v]++;
  }
}
long long Solve(int cur, bool dec) {
  int v = 0;
  long long ret = 0;
  if (dec) cnt[v]--;
  for (int i = LOG - 1; i >= 0; i--) {
    if (i > cur) {
      if (cnt[go[v][0]] == 0) return -1;
      v = go[v][0];
    } else if (i == cur) {
      if (cnt[go[v][1]] == 0) return -1;
      v = go[v][1];
      ret += 1LL << i;
    } else {
      if (cnt[go[v][0]]) {
        v = go[v][0];
      } else {
        v = go[v][1];
        ret += 1LL << i;
      }
    }
    if (dec) cnt[v]--;
  }
  return ret;
}
long long Query(long long x) {
  for (int i = 0; i < LOG; i++) {
    int y = x >> i & 1;
    if (!y && Solve(i, false) != -1) {
      return Solve(i, true);
    }
  }
  return -1;
}
int main() {
  newNode();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    Add(x);
  }
  long long cur = 0;
  for (int i = 0; i < n; i++) {
    long long t = Query(cur);
    if (t != -1)
      ans.push_back(t), cur ^= t;
    else
      return !printf("No");
  }
  puts("Yes");
  for (int i = 0; i < n; i++) printf("%lld ", ans[i]);
  return 0;
}
