#include <bits/stdc++.h>
using namespace std;
int arr[110];
int main() {
  int n, aux;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> aux;
    arr[aux]++;
  }
  int v = -1, p = -1, cv, cp, cont = 0;
  for (int i = 0; i < 108; i++) {
    cont += (arr[i] > 0);
    if (arr[i] > 0 and v == -1)
      v = i, cv = arr[i];
    else if (arr[i] > 0 and p == -1)
      p = i, cp = arr[i];
  }
  if (cont != 2 or cv != cp)
    cout << "NO\n";
  else
    cout << "YES\n" << v << ' ' << p << '\n';
  return 0;
}
