#include <bits/stdc++.h>
using namespace std;
inline long long read();
const int N = 1e5 + 2;
int n, tp, t[N];
long long x[N], sum;
queue<int> c[62];
void Work() {
  n = read();
  for (int i = 1; i <= n; ++i) {
    x[i] = read();
    sum ^= x[i];
    for (int j = 60; j >= 0; --j)
      if ((x[i] >> j) & 1) {
        c[j].push(i);
        break;
      }
  }
  while (sum) {
    bool ok = 0;
    for (int i = 0; i <= 60; ++i)
      if ((sum >> i) & 1 && !c[i].empty()) {
        t[++tp] = c[i].front();
        c[i].pop();
        sum ^= x[t[tp]];
        ok = 1;
        break;
      }
    if (!ok) {
      printf("No");
      return;
    }
  }
  if (tp != n) {
    printf("No");
    return;
  }
  printf("Yes\n");
  for (int i = n; i >= 1; --i) printf("%lld ", x[t[i]]);
}
int main() {
  Work();
  return 0;
}
inline long long read() {
  char c;
  bool type = 1;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') type = 0;
  long long ans = c ^ 48;
  while ((c = getchar()) >= '0' && c <= '9')
    ans = (ans << 3) + (ans << 1) + (c ^ 48);
  return type ? ans : -ans;
}
