#include <bits/stdc++.h>
using namespace std;
long long int power[62];
vector<long long int> arr[62];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  power[0] = 1;
  for (long long int i = 1; i <= 60; i++) {
    power[i] = power[i - 1] * 2;
  }
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    long long int z;
    cin >> z;
    for (long long int j = 60; j >= 0; j--) {
      if (z & power[j]) {
        arr[j].push_back(z);
        break;
      }
    }
  }
  vector<long long int> ans;
  for (long long int i = 60; i >= 0; i--) {
    if (arr[i].size() == 0) {
      continue;
    }
    vector<long long int> x;
    x.push_back(arr[i][0]);
    long long int j = 1;
    long long int ind = 0;
    while (1) {
      if (j == arr[i].size()) {
        if (ind == ans.size()) {
          break;
        } else {
          x.push_back(ans[ind]);
          ind++;
        }
      } else {
        if (ind == ans.size()) {
          cout << "No";
          return 0;
        }
        x.push_back(ans[ind]);
        if (ans[ind] & power[i]) {
          x.push_back(arr[i][j]);
          j++;
        }
        ind++;
      }
    }
    ans.clear();
    for (long long int j = 0; j < x.size(); j++) {
      ans.push_back(x[j]);
    }
  }
  cout << "Yes\n";
  for (long long int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
