#include <bits/stdc++.h>
using namespace std;
long long a[100001];
multiset<long long> num[64];
long long power2[64];
long long ans[100001], cnt = 1;
long long digit(long long n, long long po) { return (n / power2[po - 1]) % 2; }
int main() {
  long long n;
  long long cur = 1000000000;
  long long i, j;
  power2[0] = 1;
  for (i = 1; i <= 63; i++) power2[i] = power2[i - 1] * 2;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    long long x = a[i], t = 0;
    while (x) t++, x /= 2;
    num[t].insert(a[i]);
  }
  for (i = 1; i <= 63; i++)
    if (num[i].size()) {
      ans[cnt++] = cur = *num[i].begin(), num[i].erase(num[i].begin());
      break;
    }
  for (i = 1; i < n; i++) {
    bool f = false;
    for (j = 1; j <= 63; j++)
      if (!digit(cur, j) && num[j].size()) {
        cur = cur ^ *num[j].begin(), ans[cnt++] = *num[j].begin(),
        num[j].erase(num[j].begin()), f = true;
        break;
      }
    if (!f) break;
  }
  if (cnt <= n)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    for (i = 1; i < cnt - 1; i++) cout << ans[i] << " ";
    cout << ans[n] << endl;
  }
  return 0;
}
