#include <bits/stdc++.h>
using namespace std;
long long n, ans[100005];
struct node {
  long long val, h;
} aa[100005];
stack<long long> S[70];
long long cmp(node a, node b) { return a.val < b.val; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> aa[i].val;
    sum ^= aa[i].val;
  }
  for (long long i = 1; i <= n; i++) {
    long long x = aa[i].val;
    while (x) {
      x /= 2;
      aa[i].h++;
    }
    S[aa[i].h].push(i);
  }
  for (long long i = 1; i <= n; i++) {
    long long a = sum, len = 1, pos = 0;
    while (a) {
      if ((a & 1) && !S[len].empty()) {
        pos = S[len].top();
        S[len].pop();
        break;
      }
      ++len;
      a /= 2;
    }
    if (!pos) {
      cout << "No" << endl;
      return 0;
    }
    sum ^= aa[pos].val;
    ans[++ans[0]] = aa[pos].val;
  }
  reverse(ans + 1, ans + n + 1);
  cout << "Yes" << endl;
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
