#include <bits/stdc++.h>
using namespace std;
int n, size[65];
long long ans[100010], aaa, now;
vector<long long> M[65];
int main() {
  cin >> n;
  for (int t = 1; t <= n; ++t) {
    scanf("%I64d", &aaa);
    for (int i = 59; ~i; --i)
      if ((aaa >> i) & 1) {
        M[i].push_back(aaa);
        break;
      }
  }
  for (int i = 1; i <= n; ++i) {
    bool flaaaag = 0;
    for (int j = 0; j < 60; ++j)
      if (!((now >> j) & 1)) {
        if (size[j] == M[j].size()) continue;
        long long x = M[j][size[j]];
        size[j]++;
        now ^= x;
        ans[i] = x;
        flaaaag = 1;
        break;
      }
    if (!flaaaag) return puts("No"), 0;
  }
  puts("Yes");
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
  return 0;
}
