#include <bits/stdc++.h>
using namespace std;
int n;
long long x;
vector<long long> v[63];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n && cin >> x; i++)
    v[63 - __builtin_clzll(x)].push_back(x);
  for (int i = 0; i < 63; i++) sort(v[i].rbegin(), v[i].rend());
  long long cur = 0;
  vector<long long> ans;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 63; j++) {
      if ((1LL << j) & cur) continue;
      if (v[j].size() == 0) continue;
      ans.push_back(v[j].back());
      cur ^= v[j].back();
      v[j].pop_back();
      break;
    }
  }
  if (ans.size() != n) return cout << "No" << endl, 0;
  cout << "Yes" << endl;
  for (auto &i : ans) cout << i << " ";
  cout << endl;
}
