#include <bits/stdc++.h>
using namespace std;
int n;
long long uu, ans[100005];
queue<long long> que[65];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &uu);
    for (int j = 60; j >= 0; j--)
      if (uu & (1ll << j)) {
        que[j].push(uu);
        break;
      }
  }
  long long now = 0;
  for (int i = 1; i <= n; i++) {
    bool flag = false;
    for (int j = 0; j <= 60; j++)
      if ((now & (1ll << j)) == 0)
        if (!que[j].empty()) {
          ans[i] = que[j].front();
          now ^= ans[i];
          que[j].pop();
          flag = true;
          break;
        }
    if (!flag) {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
  printf("\n");
  return 0;
}
