#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 20, inf = 2e9 + 20, mod = 1e9 + 7;
set<pair<double, long long> > s;
long long n, x, mx;
vector<pair<double, long long> > v[80];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    long long m = x, b = 0;
    while (m) {
      b++;
      m /= 2;
    }
    v[b].push_back({0, x});
    mx = max(mx, b);
  }
  if (v[mx].size() > 1) {
    cout << "No\n";
    return 0;
  }
  s.insert({0, 0});
  s.insert({1, v[mx][0].second});
  for (int i = mx - 1; i > 0; --i) {
    if (v[i].size() == 0) continue;
    int w = 1, j = 0, flag = 0;
    for (set<pair<double, long long> >::iterator it = s.begin(); it != s.end();
         it++) {
      if (!w) {
        if ((((it->second) >> (i - 1)) & 1)) w = 1;
      }
      if (w) {
        w = 0;
        set<pair<double, long long> >::iterator it2 = it;
        it2++;
        if (it2 == s.end()) {
          v[i][j].first = (it->first) + 1;
        } else {
          v[i][j].first = ((it->first) + (it2->first)) / 2;
        }
        j++;
      }
      if (j == v[i].size()) {
        flag = 1;
        break;
      }
    }
    if (!flag) {
      cout << "No\n";
      return 0;
    } else {
      for (int a = 0; a < j; ++a) {
        s.insert(v[i][a]);
      }
    }
  }
  cout << "Yes\n";
  for (set<pair<double, long long> >::iterator it = s.begin(); it != s.end();
       it++) {
    if (it == s.begin()) continue;
    cout << (it->second) << ' ';
  }
  cout << endl;
  return 0;
}
