#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
const double pi = acos(-1.0);
int n;
int m;
int main() {
  cin >> n;
  vector<long long> a[64];
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    int len = 64 - __builtin_clzll(x);
    a[len].push_back(x);
  }
  vector<long long> cert;
  for (int i = 64; i >= 0; i--) {
    auto& cur = a[i];
    if (((int)(cur).size()) > 0) {
      long long mask = 0;
      int cnt = 1;
      vector<long long> new_cert;
      mask ^= cur.back();
      new_cert.push_back(cur.back());
      cur.pop_back();
      for (int j = 0; j < ((int)(cert).size()); j++) {
        mask ^= cert[j];
        new_cert.push_back(cert[j]);
        if ((mask & (1ll << (i - 1))) == 0) {
          if (((int)(cur).size())) {
            mask ^= cur.back();
            new_cert.push_back(cur.back());
            cur.pop_back();
          }
          cnt++;
        }
      }
      if (((int)(cur).size())) {
        puts("No");
        return 0;
      }
      cert = new_cert;
    }
  }
  cout << "Yes" << endl;
  for (auto x : cert) {
    cout << x << " ";
  }
  return 0;
}
