#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  using ll = long long;
  map<ll, vector<ll>> v;
  ll x = 0;
  for (ll i = 0, y; i < n; ++i) {
    cin >> y;
    v[63 - __builtin_clzll(y)].push_back(y);
  }
  vector<ll> r;
  for (int i = 0; i < n; ++i) {
    bool found = false;
    for (int j = 0; !found && j < 60; ++j) {
      if (((x >> j) & 1) == 0 && !v[j].empty()) {
        found = true;
        x ^= v[j].back();
        r.push_back(v[j].back());
        v[j].pop_back();
      }
    }
    if (!found) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (auto x : r) cout << x << ' ';
  return 0;
}
