#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const double ex = 1e-10;
using namespace std;
long long a[112345];
vector<long long> aa[88];
int getid(long long x) {
  int ans = 0;
  while (x != 0LL) {
    ans++;
    x /= 2LL;
  }
  return ans - 1;
}
vector<long long> res;
int tmp[88];
int maxid;
bool check(long long x) {
  int id = getid(x);
  if (id < maxid) return true;
  if (tmp[id] + 1 != aa[id].size()) return true;
  return false;
}
long long shit[88];
int main() {
  int N;
  cin >> N;
  shit[0] = 1;
  for (int i = 1; i <= 66; i++) {
    shit[i] = shit[i - 1] * 2LL;
  }
  long long ans = 0;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    int id = getid(a[i]);
    maxid = max(maxid, id);
    aa[id].push_back(a[i]);
    ans = ans ^ a[i];
  }
  while (res.size() < N) {
    if (check(ans) || ans == 0) {
      puts("No");
      return 0;
    }
    int id = 0;
    int bid = getid(ans);
    while ((tmp[id] + 1 >= aa[id].size() || (ans & shit[id]) != shit[id]) &&
           (id != bid))
      id++;
    if (tmp[id] == aa[id].size()) {
      puts("No");
      return 0;
    }
    res.push_back(aa[id][tmp[id]]);
    ans = ans ^ aa[id][tmp[id]++];
    while (tmp[maxid] == aa[maxid].size()) maxid--;
  }
  puts("Yes");
  for (int i = N - 1; i >= 0; i--) {
    cout << res[i] << " ";
  }
  return 0;
}
