#include <bits/stdc++.h>
using namespace std;
int n, m[105];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    m[x]++;
  }
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= 100; j++) {
      if (m[i] == m[j] && m[i] != 0 && i != j && m[i] + m[j] == n) {
        cout << "YES\n" << i << ' ' << j;
        return;
      }
    }
  }
  cout << "NO";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
