#include <bits/stdc++.h>
using namespace std;
static int LOCAL = 0;
const long long int mod = 1000000007ll;
const long long int MOD = 1000000009ll;
const long long int INF = LLONG_MAX / 10;
const int inf = INT_MAX / 10;
long long int powermod(long long int _a, long long int _b,
                       long long int _m = mod) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
long long int power(long long int _a, long long int _b) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a);
    _b /= 2;
    _a = (_a * _a);
  }
  return _r;
}
long long int add(long long int a, long long int b, long long int m = mod) {
  long long int x = a + b;
  while (x >= m) x -= m;
  return x;
}
long long int sub(long long int a, long long int b, long long int m = mod) {
  long long int x = a - b;
  while (x < 0) x += m;
  return x;
}
long long int mul(long long int a, long long int b, long long int m = mod) {
  return ((a % m) * (b % m)) % m;
}
long long int gcd(long long int a, long long int b) {
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
long long int lcm(long long int a, long long int b) {
  return (max(a, b) / gcd(a, b)) * min(a, b);
}
struct pair_hash {
  std::size_t operator()(const std::pair<int, int> &p) const {
    auto h1 = std::hash<long long int>{}(p.first);
    auto h2 = std::hash<long long int>{}(p.second);
    return (int)add(h1, mul(h2, h1, MOD));
  }
};
struct cmp {
  bool operator()(pair<int, pair<long long int, long long int> > const &l,
                  pair<int, pair<long long int, long long int> > const &r) {
    return l.second.first < r.second.first;
  }
} myobject;
long long int po[70];
class node {
 public:
  int b;
  int cnt;
  node *next[2], *par;
  node(int x, node *y) {
    cnt = 0;
    b = x;
    next[0] = next[1] = NULL;
    par = y;
  }
} * root;
void update(long long int x) {
  node *tmp = root;
  for (int i = 61; i >= 0; i--) {
    int idx = ((x & po[i]) > 0) ? 1 : 0;
    if (tmp->next[idx] == NULL) {
      tmp->next[idx] = new node(idx, tmp);
    }
    tmp = tmp->next[idx];
    tmp->cnt++;
  }
}
long long int query(long long int x, long long int lim) {
  long long int ret = 0;
  node *tmp = root;
  bool a = false, b = false;
  for (int i = 61; i >= 0; i--) {
  other1:
    int idx = ((x & po[i]) > 0) ? 1 : 0;
    if (tmp->next[idx ^ 1] != NULL) {
      if (ret + po[i] >= lim) {
        if (tmp->next[idx] != NULL) goto other;
        a = true;
        node *tmp1 = tmp->par;
        for (int j = i + 1; j <= 61; j++) {
          if (ret & po[j]) {
            ret ^= po[j];
            idx = ((x & po[j]) > 0) ? 1 : 0;
            if (tmp1->next[idx] != NULL) {
              i = j - 1;
              b = true;
              tmp = tmp1->next[idx];
              goto other1;
            } else
              tmp1 = tmp1->par;
          } else
            tmp1 = tmp1->par;
        }
        return LLONG_MAX;
      }
      ret += po[i];
      tmp = tmp->next[idx ^ 1];
    } else {
    other:
      tmp = tmp->next[idx];
    }
  }
  if (a)
    if (!b) return LLONG_MAX;
  return ret;
}
void del(long long int x) {
  node *tmp = root;
  for (int i = 61; i >= 0; i--) {
    int idx = ((x & po[i]) > 0) ? 1 : 0;
    tmp->next[idx]->cnt--;
    if (tmp->next[idx]->cnt == 0) {
      tmp->next[idx] = NULL;
      break;
    }
    tmp = tmp->next[idx];
  }
  return;
}
const int N = 100010;
int n;
long long int b[N], a[N];
int main() {
  LOCAL = 0;
  if (LOCAL) {
    freopen("C:\\Users\\Smit Patel\\Downloads\\D-large.in", "r", stdin);
    freopen("C:\\Users\\Smit Patel\\Desktop\\out.txt", "w", stdout);
  }
  po[0] = 1;
  for (int i = 1; i <= 61; i++) po[i] = po[i - 1] * 2;
  root = new node(2, NULL);
  scanf("%d", &n);
  a[n] = 0;
  for (int i = 1; i <= n; i++) scanf("%lld", &b[i]), a[n] ^= b[i], update(b[i]);
  for (int i = n; i >= 2; i--) {
    a[i - 1] = query(a[i], a[i]);
    if (a[i - 1] == LLONG_MAX) {
      cout << "No";
      return 0;
    }
    b[i] = a[i - 1] ^ a[i];
    del(b[i]);
  }
  b[1] = query(0, INF);
  cout << "Yes" << endl;
  for (int j = 1; j <= n; j++) {
    cout << b[j] << " ";
  }
  cout << endl;
  ;
  return 0;
}
