#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  int a, b, c, ax = 0, bx = 0, cx = 0, x = 1;
  string ans = "No";
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  a = v[0];
  ax++;
  for (int i = 1; i < n; i++) {
    if (v[i - 1] != v[i]) {
      x++;
    }
    if (x == 1) {
      ax++;
    }
    if (x == 2) {
      b = v[i];
      bx++;
    }
    if (x == 3) {
      c = v[i];
      cx++;
    }
  }
  if (x == 1 && a == 0) ans = "Yes";
  if (x == 2 && a == 0 && ax == bx) ans = "Yes";
  if (x == 3) {
    if (((a | b) - (a & b) == c) && ((b | c) - (b & c) == a) &&
        ((c | a) - (c & a) == b)) {
      if (ax == bx && bx == cx && cx == ax) {
        ans = "Yes";
      }
    }
  }
  cout << ans << endl << a << " " << b << " " << c << endl << x;
}
