#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, cnt = 0, tot[60] = {0};
  vector<long long> v[60];
  long long val, arr[100005];
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &val);
    for (int bit = 59; bit >= 0; bit--) {
      if (val & (1LL << bit)) {
        v[bit].push_back(val);
        break;
      }
    }
  }
  while (1) {
    if (cnt == n) break;
    int bit;
    for (bit = 0; bit <= 59; bit++) {
      if (!tot[bit] && v[bit].size()) {
        arr[++cnt] = v[bit].back();
        v[bit].pop_back();
        for (int i = 0; i <= 59; i++) {
          if (arr[cnt] & (1LL << i)) {
            tot[i] ^= 1;
          }
        }
        break;
      }
    }
    if (bit == 60) {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  for (int i = 1; i <= n; i++) {
    printf("%lld ", arr[i]);
  }
  return 0;
}
