#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n;
long long int nums[N];
vector<long long int> all[64];
vector<long long int> ans;
int main() {
  cin >> n;
  long long int acc = 0;
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
    acc ^= nums[i];
    long long int k = nums[i];
    int pos = 0;
    while (k > 0) {
      pos++;
      k >>= 1;
    }
    all[pos - 1].push_back(nums[i]);
  }
  for (int i = 0; i < 64; i++) {
    sort(all[i].begin(), all[i].end());
    reverse(all[i].begin(), all[i].end());
  }
  long long int cur = acc;
  for (int i = 0; i < n; i++) {
    if (cur == 0) {
      cout << "No";
      return 0;
    }
    long long int now = -1;
    for (int j = 0; j < 64; j++) {
      if (cur & (1ll << j)) {
        if (int(all[j].size()) > 0) {
          now = all[j].back();
          all[j].pop_back();
          break;
        }
      }
    }
    if (now == -1) {
      cout << "No";
      return 0;
    }
    ans.push_back(now);
    cur ^= now;
  }
  reverse(ans.begin(), ans.end());
  cout << "Yes\n";
  for (int i = 0; i < n; i++) {
    cout << ans[i] << ' ';
  }
  return 0;
}
