#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  scanf("%d", &n);
  vector<ll> a(n);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
  vector<ll> res;
  vector<ll> v[62];
  vector<int> cur(62);
  for (int i = 0; i < n; i++) {
    int j;
    for (j = 60; j >= 0; j--) {
      if ((a[i] & (1LL << j))) break;
    }
    v[j].push_back(a[i]);
  }
  ll p = 0;
  while (true) {
    bool fg = 0;
    for (int j = 0; j <= 60; j++) {
      if ((p & (1LL << j)) == 0 && cur[j] < v[j].size()) {
        p ^= v[j][cur[j]];
        res.push_back(v[j][cur[j]]);
        cur[j]++;
        fg = 1;
        break;
      }
    }
    if (!fg || (res.size() == n)) break;
  }
  if (res.size() == n) {
    puts("Yes");
    for (int i = 0; i < n; i++) {
      printf("%lld%c", res[i], i == n - 1 ? '\n' : ' ');
    }
  } else {
    puts("No");
  }
  return 0;
}
