#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using vi = vector<int>;
using ll = long long;
using vll = vector<ll>;
template <typename T, typename S>
ostream& operator<<(ostream& os, pair<T, S> p) {
  os << "{ " << p.first << ", " << p.second << "}";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[ ";
  for (auto x : v) os << x << " ";
  os << "]";
  return os;
}
template <typename T>
void print_vec(vector<T>& v) {
  for (auto x : v) cout << x << " ";
  cout << "\n";
}
int n;
vll a;
int main() {
  scanf("%d", &n);
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &a[i]);
  }
  vector<bool> used(n, false);
  vector<pair<ll, int>> blocks{{0, -1}};
  for (int k = 59; k >= 0; --k) {
    vector<pair<ll, int>> blocks2;
    int j = 0;
    ll cur = 0;
    for (int i = 0; i < n; ++i) {
      if (!used[i] && ((a[i] >> k) & 1)) {
        used[i] = true;
        if (j == (int)blocks.size()) {
          printf("No\n");
          return 0;
        }
        while (j < (int)blocks.size()) {
          blocks2.push_back(blocks[j]);
          cur ^= blocks[j].first;
          if (!((cur >> k) & 1LL)) {
            blocks2.push_back({a[i], i});
            cur ^= a[i];
            ++j;
            break;
          }
          ++j;
        }
      }
    }
    while (j < (int)blocks.size()) blocks2.push_back(blocks[j++]);
    blocks = blocks2;
  }
  printf("Yes\n");
  for (int i = 1; i < (int)blocks.size(); ++i) {
    printf("%lld ", blocks[i].first);
  }
  printf("\n");
}
