#include <bits/stdc++.h>
using namespace std;
queue<long long> q[65];
bool Check(long long n, long long pos) { return (bool)(n & (1LL << pos)); }
long long a[100005];
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  };
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 59; j >= 0; j--) {
      if (Check(a[i], j)) {
        q[j].push(a[i]);
        break;
      }
    }
  }
  vector<long long> ans;
  long long now = 0;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < 60; j++) {
      if (!Check(now, j) && !q[j].empty()) {
        long long tmp = q[j].front();
        q[j].pop();
        now ^= tmp;
        ans.push_back(tmp);
        break;
      }
    }
  }
  if (ans.size() != n)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    for (long long i : ans) cout << i << ' ';
  }
}
