#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
const long long N = 1e5 + 5;
long long b[N];
vector<long long> v[62];
void fail() {
  cout << "No";
  exit(0);
}
void solve() {
  long long n;
  cin >> n;
  long long mx = 0;
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
    long long tmp = b[i];
    long long cnt = 0;
    while (tmp) {
      cnt++;
      tmp /= 2;
    }
    cnt--;
    v[cnt].push_back(b[i]);
    amax(mx, cnt);
  }
  if ((long long)((v[mx]).size()) > 1) {
    fail();
  }
  vector<long long> ans;
  while (mx >= 0) {
    vector<long long> tmp;
    long long j = 0;
    bool f = 0;
    while ((long long)((v[mx]).size())) {
      if (!f) {
        f = 1;
        tmp.push_back(v[mx].back());
        v[mx].pop_back();
      } else {
        if (j == (long long)((ans).size())) fail();
        tmp.push_back(ans[j]);
        f ^= (ans[j] >> mx & 1);
        j++;
      }
    }
    while (j < (long long)((ans).size())) {
      tmp.push_back(ans[j]);
      j++;
    }
    swap(ans, tmp);
    mx--;
  }
  cout << "Yes\n";
  for (long long x : ans) {
    cout << x << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
