#include <bits/stdc++.h>
using namespace std;
vector<long long> nums[64];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    long long tmp;
    cin >> tmp;
    int highest_bit = 63 - __builtin_clzll(tmp);
    nums[highest_bit].push_back(tmp);
  }
  long long val = 0;
  vector<long long> ans;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 64; ++j) {
      if (val & (1LL << j) || nums[j].empty()) continue;
      long long nxt = nums[j].back();
      nums[j].pop_back();
      val ^= nxt;
      ans.push_back(nxt);
      break;
    }
  }
  if (ans.size() < n) {
    cout << "No" << '\n';
  } else {
    cout << "Yes" << '\n';
    for (auto x : ans) {
      cout << x << ' ';
    }
    cout << '\n';
  }
  return 0;
}
