#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double eps = (1e-5);
int isGreater(long double x, long double y) {
  if (abs(x - y) < eps) return 0;
  if (x > y) return 1;
  return -1;
}
int n;
vector<long long> b;
vector<long long> leftMost[61];
int getLeftMost(long long x) {
  for (int i = 60; i >= 0; --i) {
    if ((x >> i) & 1) return i;
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  b.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
    leftMost[getLeftMost(b[i])].push_back(b[i]);
  }
  list<long long> lst;
  long long x = 0;
  for (int cnt = 0; cnt < n; ++cnt) {
    for (int i = 0; i <= 60; ++i) {
      if ((1LL << i) & x) continue;
      if (leftMost[i].empty()) continue;
      long long y = leftMost[i].back();
      leftMost[i].pop_back();
      lst.push_back(y);
      x ^= y;
      break;
    }
  }
  if ((int)(lst).size() < n) {
    cout << "No\n";
    return 0;
  }
  cout << "Yes\n";
  for (auto item : lst) cout << item << ' ';
  return 0;
}
