#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
struct Timer {
  static map<string, Timer> ar;
  long long time;
  long long last;
  bool running;
  int count;
  Timer() : time(0), running(false), count(0) {}
  void start() {}
  void stop() {}
  static void start(string name) {}
  static void stop(string name) {}
  long double time_f() { return 0; }
  long double avg_time_f() { return 0; }
};
map<string, Timer> Timer::ar;
struct TimerRegion {
  string name;
  TimerRegion(string _name) : name(_name) { Timer::start(name); }
  ~TimerRegion() { Timer::stop(name); }
};
const int MAXN = (int)1e5 + 10;
long long ar[MAXN];
vector<int> by_bit[60];
long long ans[MAXN];
long long ansl;
long long doit(int bit, long long cur) {
  if (bit != 0) cur = doit(bit - 1, cur);
  while (!by_bit[bit].empty() && (cur ^ ar[by_bit[bit].back()]) > cur) {
    cur ^= ar[by_bit[bit].back()];
    ans[ansl++] = by_bit[bit].back();
    by_bit[bit].pop_back();
    if (bit != 0) cur = doit(bit - 1, cur);
  }
  return cur;
}
void solve() {
  TimerRegion timer_func(__FUNCTION__);
  ;
  ansl = 0;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%lld", &ar[i]);
  sort(ar, ar + n);
  reverse(ar, ar + n);
  int highest_bit = 0;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 60; ++j)
      if (ar[i] >= (1ll << j) && ar[i] < (1ll << (j + 1))) {
        by_bit[j].push_back(i);
        highest_bit = max(highest_bit, j);
        break;
      }
  doit(highest_bit, 0);
  if (ansl == n) {
    printf("Yes\n");
    for (int i = 0; i < n; ++i) printf("%lld ", ar[ans[i]]);
  } else
    printf("No\n");
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
