#include <bits/stdc++.h>
using namespace std;
int n;
int a[105];
int main() {
  cin >> n;
  int tmp;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    a[tmp] += 1;
  }
  int cnt = 0, first = -1, second = -1;
  for (int i = 0; i < 105; ++i) {
    if (a[i] > 0) {
      if (first == -1) {
        first = i;
      } else if (second == -1) {
        second = i;
      } else {
        cout << "NO" << endl;
        return 0;
      }
      if (cnt == 0) {
        cnt = a[i];
      } else if (cnt != a[i]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  if (second > 0) {
    cout << "YES" << endl;
    cout << first << " " << second << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
