#include <bits/stdc++.h>
using namespace std;
int a[110];
int main() {
  int n;
  cin >> n;
  int b;
  for (int i = 0; i < 105; i++) a[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> b;
    a[b]++;
  }
  int c = 0, t = 0, d[3], d2[3];
  for (int i = 0; i <= 3; i++) {
    d[i] = 0;
    d2[i] = 0;
  }
  int j = 0;
  for (int i = 0; i <= 100; i++) {
    if (a[i] > 0) {
      c++;
      d[j] = a[i];
      d2[j] = i;
      j++;
    }
    if (c > 2) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (n == 2 && d2[0] > 0 && d2[1] > 0) {
    cout << "YES" << endl;
    cout << d2[0] << " " << d2[1] << endl;
    return 0;
  } else if (c == 1) {
    cout << "NO" << endl;
    return 0;
  } else {
    if (d[0] == d[1]) {
      cout << "YES" << endl;
      cout << d2[0] << " " << d2[1] << endl;
    } else
      cout << "NO" << endl;
  }
}
