#include <bits/stdc++.h>
using namespace std;
long long n, num[4096], num1[200], a;
bool flag = true;
void reedInp() {
  int tmp;
  cin >> n;
  for (int j = 0; j < n; j++) {
    cin >> tmp;
    num[tmp]++, num1[tmp]++;
  }
}
void find() {
  cout << "YES\n";
  for (int j = 1; j <= 100; j++)
    if (num1[j] == num[100] && a < 2) cout << j << ' ', a++;
}
void check() {
  if (num[99] == num[100] && !num[98])
    find();
  else
    cout << "NO";
}
int main() {
  reedInp();
  sort(num, num + 101);
  check();
}
