#include <bits/stdc++.h>
using namespace std;
const int MAX = 300005;
set<pair<long long, int> > s;
vector<long long> ans;
int main() {
  int n;
  long long x, num = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &x);
    num ^= x;
    s.insert(make_pair(x, i));
  }
  set<pair<long long, int> >::iterator it;
  bool flag = true;
  while (flag) {
    flag = false;
    for (int i = 0; i < 60; i++) {
      if (num & (1LL << i)) {
        it = s.lower_bound(make_pair(1LL << i, -1));
        x = (*it).first;
        if (it != s.end() && x < (1LL << (i + 1))) {
          ans.push_back(x);
          s.erase(it);
          num ^= x;
          flag = true;
          break;
        }
      }
    }
  }
  if (ans.size() < n) {
    printf("No");
    return 0;
  }
  printf("Yes\n");
  int len = ans.size();
  for (int i = len - 1; i >= 0; i--) printf("%lld ", ans[i]);
}
