#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int maxn = 1e5 + 5;
const long long inf = (1 << 62);
int n;
vector<long long> ve;
vector<long long> bite;
vector<long long> G[maxn];
int pos[maxn];
int maxlen;
void get_bite(long long sum) {
  bite.clear();
  while (sum) {
    bite.push_back(sum % 2);
    sum >>= 1;
  }
}
bool solve() {
  long long sum = 0;
  vector<long long> ans;
  for (int i = 1; i <= n; i++) {
    get_bite(sum);
    bool flag = false;
    for (int j = 1; j <= maxlen; j++) {
      if (j == bite.size())
        continue;
      else if (j < bite.size() && (bite[j - 1] == 0)) {
        if (G[j].size() > 0 && (G[j].size() > pos[j])) {
          flag = true;
          ans.push_back(G[j][pos[j]]);
          sum ^= G[j][pos[j]];
          pos[j]++;
          break;
        }
      } else if (j > bite.size()) {
        if (G[j].size() > 0 && (G[j].size() > pos[j])) {
          flag = true;
          ans.push_back(G[j][pos[j]]);
          sum ^= G[j][pos[j]];
          pos[j]++;
          break;
        }
      }
    }
    if (!flag) return false;
  }
  puts("Yes");
  for (int i = 0; i < ans.size(); i++) {
    printf("%lld ", ans[i]);
  }
  cout << endl;
  return true;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long a;
    scanf("%lld", &a);
    ve.push_back(a);
  }
  for (int i = 0; i < ve.size(); i++) {
    long long tmp = ve[i];
    int cnt = 0;
    while (tmp) {
      cnt++;
      tmp >>= 1;
    }
    G[cnt].push_back(ve[i]);
    maxlen = max(maxlen, cnt);
  }
  for (int i = 1; i <= maxlen; i++) {
    sort(G[i].begin(), G[i].end());
  }
  if (solve() == false) puts("No");
  return 0;
}
