#include <bits/stdc++.h>
using namespace std;
int n;
vector<long long> worki[61];
vector<long long> wszystkie;
vector<long long> perm;
vector<long long> nowy;
void wczytaj() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    wszystkie.push_back(a);
  }
}
inline long long pow(int k) {
  long long a = 1;
  a <<= k;
  return a;
}
void posegreguj() {
  for (int i = 60 - 1; i >= 0; i--)
    for (__typeof(wszystkie.begin()) it = wszystkie.begin();
         it != wszystkie.end(); it++)
      if (*it >= pow(i)) {
        worki[i].push_back(*it);
        *it = -1;
      }
}
bool znajdz_perma() {
  for (int i = 60 - 1; i >= 0; i--) {
    bool akt = 0;
    nowy.clear();
    int j = 0;
    int s = perm.size();
    for (__typeof(worki[i].begin()) it = worki[i].begin(); it != worki[i].end();
         it++) {
      while (akt && j < s) {
        nowy.push_back(perm[j]);
        if (perm[j] & pow(i)) akt = 0;
        j++;
      }
      if (akt == 0) {
        nowy.push_back(*it);
        akt = 1;
      } else
        return 0;
    }
    while (j < s) nowy.push_back(perm[j++]);
    perm.clear();
    for (__typeof(nowy.begin()) it = nowy.begin(); it != nowy.end(); it++)
      perm.push_back(*it);
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  wczytaj();
  posegreguj();
  if (znajdz_perma()) {
    cout << "Yes\n";
    for (__typeof(perm.begin()) it = perm.begin(); it != perm.end(); it++)
      cout << *it << " ";
    cout << endl;
  } else
    cout << "No\n";
  return 0;
}
