#include <bits/stdc++.h>
using namespace std;
stack<long long> stk[61];
vector<long long> ans;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    for (int j = 60; ~j; j--)
      if (x >> j) {
        stk[j].push(x);
        break;
      }
  }
  long long pre = 0;
  for (int i = 1, j; i <= n; i++) {
    for (j = 0; j <= 60; j++)
      if (!(pre >> j & 1) && !stk[j].empty()) {
        pre ^= stk[j].top(), ans.push_back(stk[j].top()), stk[j].pop();
        break;
      }
    if (j > 60) return puts("No"), 0;
  }
  cout << "Yes" << endl;
  for (long long i : ans) cout << i << ' ';
  return 0;
}
