#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
const double PI = acos(-1.0);
const double eps = 1e-10;
const int N = 1e5 + 5;
int n;
vector<long long> vec[60], ans;
int main() {
  scanf("%d", &n);
  long long b, res = 0;
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &b);
    for (int i = 59; i >= 0; i--) {
      if (b >> i & 1) {
        vec[i].push_back(b);
        break;
      }
    }
  }
  for (int j = 0; j < n; j++) {
    bool sign = true;
    for (int i = 0; i < 60; i++) {
      if (res >> i & 1 || vec[i].empty()) continue;
      ans.push_back(vec[i].back());
      vec[i].pop_back();
      res ^= ans.back();
      sign = false;
      break;
    }
    if (sign) break;
  }
  int len = ans.size();
  if (len == n) {
    puts("Yes");
    for (int i = 0; i < n; i++) {
      printf("%I64d%c", ans[i], i == n - 1 ? '\n' : ' ');
    }
  } else
    puts("No");
  return 0;
}
