#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
string tostr(int n) {
  stringstream rr;
  rr << n;
  return rr.str();
}
const int mod = 1e9 + 7;
const int mxn = 1e5 + 9;
const long double eps = 1e-9;
long long ans[mxn], sz[66], num;
vector<long long> v[66];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long i, j, k, n, m, x;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    for (j = 59; j >= 0; j--) {
      if ((x >> j) & 1) {
        v[j].push_back(x);
        break;
      }
    }
  }
  for (i = 0; i < n; i++) {
    bool ok = 0;
    for (j = 0; j < 60; j++) {
      if (((num >> j) & 1) == 0) {
        if (sz[j] == v[j].size()) continue;
        x = v[j][sz[j]];
        ans[i] = x;
        num ^= x;
        ok = 1;
        sz[j]++;
        break;
      }
    }
    if (!ok) return cout << "No\n", 0;
  }
  cout << "Yes\n";
  for (i = 0; i < n; i++) cout << ans[i] << ' ';
  return 0;
}
