#include <bits/stdc++.h>
using namespace std;
struct {
  long long val;
  int next;
} node[110000];
long long bit[63];
int a[63], b[63], head[63];
int n, cnt;
char str[63];
void init() {
  for (long long i = 0, j = 1; i < 63; ++i, j <<= 1) bit[(int)i] = j;
}
void clear() { cnt = 0; }
void insert(int x, long long val) {
  ++cnt;
  node[cnt].val = val;
  node[cnt].next = head[x];
  head[x] = cnt;
}
bool empty(int x) { return !head[x]; }
long long consume(int x) {
  long long ret = node[head[x]].val;
  head[x] = node[head[x]].next;
  return ret;
}
void work() {
  for (int i = 0; i < 63; ++i)
    if (a[i] > b[i] + 1) {
      printf("No\n");
      return;
    }
  printf("Yes\n");
  long long val = 0;
  while (1) {
    for (int i = 0; i < 63; ++i) {
      if (i == 63 - 1) {
        printf("\n");
        return;
      }
      if (!empty(i) && !(val & bit[i])) {
        long long next = consume(i);
        cout << next << " ";
        val ^= next;
        break;
      }
    }
  }
}
int main() {
  init();
  while (scanf("%d", &n) != EOF) {
    clear();
    memset(head, 0, sizeof(head));
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    long long val;
    for (int i = 0; i < n; ++i) {
      scanf("%s", str);
      val = 0;
      for (int i = 0, j = strlen(str); i < j; ++i)
        val = val * 10 + str[i] - '0';
      for (int i = 0; i < 63; ++i)
        if (val & bit[i]) {
          if (val - bit[i] > bit[i])
            b[i]++;
          else {
            a[i]++;
            insert(i, val);
            break;
          }
        }
    }
    work();
  }
}
