#include <bits/stdc++.h>
long long bin[100], num[1000000], hd[1000000], en[1000000], ans[1000000];
long long bsf(long long a) {
  long long i, j;
  for (i = 1, j = 1; i <= 62; i++, j = j << 1) {
    if (a & 1) {
      return j - 1;
    }
  }
  return 0;
}
int main() {
  long long i, j, k, a, b, c, n, m, t;
  scanf("%lld", &n);
  bin[1] = 1;
  for (i = 2; i <= 62; i++) {
    bin[i] = bin[i - 1] << 1;
  }
  for (i = 1; i <= n; i++) {
    scanf("%lld", &num[i]);
  }
  std::sort(num + 1, num + n + 1);
  memset(hd, 0, sizeof(*hd) * (100));
  memset(en, 0, sizeof(*en) * (100));
  j = 1;
  k = 0;
  for (i = 1; i <= n; i++) {
    while (j <= num[i]) {
      j = j << 1;
      k += 1;
    }
    if (hd[k] == 0) {
      hd[k] = i;
    }
  }
  en[k] = n;
  a = hd[k];
  for (i = k - 1; i >= 1; i--) {
    if (hd[i] > 0) {
      en[i] = a - 1;
      a = hd[i];
    }
  }
  a = 0;
  for (i = 1; i <= n; i++) {
    a = a ^ num[i];
  }
  *ans = 0;
  t = 0;
  while (a > 0) {
    for (i = 1, j = 1; i <= 62; i++, j = j << 1) {
      if (a & j) {
        if ((hd[i] > 0) && (hd[i] <= en[i])) {
          ans[++(*ans)] = num[hd[i]];
          a = a ^ num[hd[i]];
          hd[i] += 1;
          break;
        }
      }
    }
    if (i > 62) {
      goto FAIL;
    }
  }
  for (i = 1; i <= 62; i++) {
    if ((hd[i] > 0) && (hd[i] <= en[i])) {
      goto FAIL;
    }
  }
  printf("Yes\n");
  for (i = *ans; i >= 1; i--) {
    printf("%lld ", ans[i]);
  }
  printf("\n");
  return 0;
FAIL:
  printf("No\n");
  return 0;
}
