#include <bits/stdc++.h>
using namespace std;
int isP(long int hj) {
  long int op;
  for (op = 2; op <= sqrt(hj); op++) {
    if (hj % op == 0) return 0;
  }
  return 1;
}
void swap(int *p, int *q) {
  int tmp = *p;
  *p = *q;
  *q = tmp;
}
void tog(int *p) {
  if (*p == 1)
    *p = 0;
  else
    *p = 1;
}
int main() {
  long long int g, p, brk, L, s1, s2, min, clbp, clb, et, jmp, u, l1, l2, sp,
      sq, nd, maxi, li, ri, tr, mp, og, prev, lt1, lt2, n1, n2, c1, c2, jb,
      minI, min1, dp, p2, p3, ze, fst, lst, min2, c, s, sm1, sm2, sm3, sr, sl,
      l, ln, rz, rn, car, eq, r, shr, ng, d, v, curr, spl, fl, z, ev, od, t, m,
      ct, j, q, k, b, maxI, max1, max2, lt, md, a, f, n, xP, xN, w, h, d2, d1,
      u1, u2, sm, i, x, y;
  cin >> t;
  long int C[101] = {0};
  long int P[101] = {0};
  for (i = 1; i <= t; i++) {
    cin >> a;
    C[a]++;
  }
  f = 0;
  for (i = 0; i < 101; i++) {
    if (C[i] == (t / 2) && f == 0) {
      p = i;
      f = 1;
      continue;
    }
    if (C[i] == (t / 2) && f == 1) {
      q = i;
      f = 2;
      break;
    }
  }
  if (f == 2) {
    cout << "YES\n";
    cout << p << " " << q;
  } else
    cout << "NO";
  return 0;
}
