#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int a[maxn];
map<int, int> mp;
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    mp[a[i]]++;
  }
  sort(a, a + n);
  if (n % 2 == 0 && mp[a[0]] == n / 2 && mp[a[n - 1]] == n / 2) {
    cout << "YES" << endl << a[0] << " " << a[n - 1] << endl;
  } else {
    cout << "NO" << endl;
  }
}
