#include <bits/stdc++.h>
using namespace std;
struct data {
  int val;
  struct data *next[2];
};
long long p2[63];
void pre() {
  p2[0] = 1LL;
  for (int i = 1; i < 60; i++) {
    p2[i] = p2[i - 1] * 2;
  }
  return;
}
struct data *new_mem() {
  struct data *baru = (struct data *)malloc(sizeof(struct data));
  baru->next[0] = NULL;
  baru->next[1] = NULL;
  baru->val = 0;
  return baru;
}
void add_trie(long long x, struct data **root) {
  struct data *cur = *root;
  for (int i = 59; i >= 0; i--) {
    long long now = x / p2[i];
    x %= p2[i];
    if (now == 0) {
      if (cur->next[0] == NULL) {
        cur->next[0] = new_mem();
      }
      cur = cur->next[0];
    } else {
      if (cur->next[1] == NULL) {
        cur->next[1] = new_mem();
      }
      cur = cur->next[1];
    }
    cur->val++;
  }
  return;
}
void delete_trie(long long x, struct data **root) {
  struct data *cur = *root;
  for (int i = 59; i >= 0; i--) {
    long long now = x / p2[i];
    x %= p2[i];
    if (now == 0) {
      cur = cur->next[0];
    } else {
      cur = cur->next[1];
    }
    cur->val--;
  }
  return;
}
long long dfs(long long x, struct data **root, int lvl) {
  if (lvl == -1) return 0LL;
  long long ret = 0LL;
  long long _on = x / p2[lvl];
  struct data *now = *root;
  if (_on == 1) {
    if (now->next[0] == NULL || (now->next[0])->val == 0) return -1;
    now = now->next[0];
    ret = dfs(x % p2[lvl], &now, lvl - 1);
    return ret;
  } else {
    if (now->next[0] != NULL && (now->next[0])->val != 0) {
      ret = dfs(x % p2[lvl], &(now->next[0]), lvl - 1);
      if (ret != -1) return ret;
    }
    if (now->next[1] != NULL && (now->next[1])->val != 0) {
      ret = dfs(0, &(now->next[1]), lvl - 1);
      if (ret != -1) return p2[lvl] + ret;
    }
    return ret;
  }
}
vector<long long> ans;
int n;
void solve(struct data **root) {
  long long now = 0LL;
  for (int i = 1; i <= n; i++) {
    long long cur = dfs(now, root, 59);
    if (cur == -1) return;
    ans.push_back(cur);
    delete_trie(cur, root);
    now = now ^ cur;
  }
  return;
}
long long x;
int main() {
  pre();
  struct data *root = new_mem();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &x);
    add_trie(x, &root);
  }
  solve(&root);
  if (ans.size() != n)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 0; i < n; i++) {
      if (i > 0) printf(" ");
      printf("%lld", ans[i]);
    }
  }
  return 0;
}
