#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, LG = 65;
long long B[N], LB[N];
vector<long long> ans, has[LG];
int main() {
  long long n, xo = 0;
  scanf("%lld", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &B[i]);
    xo ^= B[i];
    for (int j = 60; j >= 0; --j) {
      if ((B[i] & (1LL << j))) {
        LB[i] = j;
        has[j].push_back(i);
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    int pos = 0;
    for (int j = 0; j <= 60; ++j) {
      if ((xo & (1LL << j)) && !has[j].empty()) {
        pos = has[j].back();
        has[j].pop_back();
        break;
      }
    }
    if (!pos) {
      printf("No\n");
      return 0;
    }
    ans.push_back(B[pos]);
    xo ^= B[pos];
  }
  printf("Yes\n");
  reverse((ans).begin(), (ans).end());
  for (auto u : ans) printf("%lld ", u);
  printf("\n");
  return 0;
}
