#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long c[N], ans[N];
int n, tot;
vector<long long> v[65];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", &c[i]);
    for (int j = 60; ~j; --j)
      if (c[i] & (1ll << j)) {
        v[j].push_back(c[i]);
        break;
      }
  }
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= 60; ++j)
      if (!(sum & (1ll << j)) && v[j].size()) {
        ans[i] = v[j].back();
        v[j].pop_back();
        break;
      }
    if (!ans[i]) {
      puts("No");
      return 0;
    }
    sum ^= ans[i];
  }
  puts("Yes");
  for (int i = 1; i <= n; ++i) printf("%I64d ", ans[i]);
  return 0;
}
