#include <bits/stdc++.h>
using namespace std;
int n, size[62], now[62];
long long q[62][300002];
vector<long long> ans;
int main() {
  cin >> n;
  long long x;
  for (register int i = (1); i <= (n); ++i) {
    cin >> x;
    for (long long z = 60; z >= 0; --z)
      if ((1ll << z) & x) {
        q[z][++size[z]] = x;
        break;
      }
  }
  long long res = 0;
  for (register int i = (1); i <= (n); ++i) {
    long long j;
    for (j = 0; j <= 60; ++j)
      if (!(res & (1ll << j)) && now[j] < size[j]) {
        res ^= q[j][++now[j]];
        ans.push_back(q[j][now[j]]);
        break;
      }
    if (j == 61) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (long long i : ans) cout << i << ' ';
}
