#include <bits/stdc++.h>
using namespace std;
int s[105];
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s[a[i]]++;
  }
  set<int> squ;
  for (int i = 0; i < n; i++) {
    squ.insert(a[i]);
  }
  squ.erase(0);
  if (squ.size() != 2) {
    cout << "NO\n";
    exit(0);
  }
  int s1 = 0, s2 = 0;
  for (int i = 0; i < 105; i++) {
    if (s[i] == 0) continue;
    if (s1 == 0) {
      if (s[i] != 0) {
        s1 = s[i];
      }
    } else {
      if (s1 == s[i]) {
        cout << "YES\n";
        for (int j = 0; j < 105; j++) {
          if (squ.count(j)) cout << j << ' ';
        }
      } else {
        cout << "NO\n";
      }
      return 0;
    }
  }
  return 0;
}
