#include <bits/stdc++.h>
using namespace std;
set<int> st;
set<int>::iterator it;
int ar[200];
int main() {
  int n, num, i;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> num;
    st.insert(num);
    ar[num]++;
  }
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  if (st.size() == 2 and n - ar[*st.begin()] == n / 2) {
    cout << "YES" << endl;
    it = st.begin();
    cout << *it << endl;
    it++;
    cout << *it << endl;
  } else {
    cout << "NO" << endl;
  }
}
