#include <bits/stdc++.h>
using namespace std;
vector<int> v(110, 0);
int main() {
  int n, a, flag = 0, b;
  vector<int> m;
  cin >> n;
  b = n;
  while (n--) {
    cin >> a;
    m.push_back(a);
    v[a]++;
  }
  sort(m.begin(), m.end());
  for (int i = m[0]; i <= m[b - 1]; i++) {
    for (int j = m[0]; j <= m[b - 1]; j++) {
      if (i != j && v[i] == v[j] && (v[i] + v[j]) == b) {
        flag = 1;
        cout << "YES" << endl << i << " " << j << endl;
        break;
      }
    }
    if (flag) break;
  }
  if (!flag) cout << "NO" << endl;
  return 0;
}
