#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int n;
int a[maxn];
map<int, int> mp;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i], ++mp[a[i]];
  sort(a + 1, a + 1 + n);
  if (mp.size() != 2 || mp.begin()->second != n / 2) return puts("NO"), 0;
  puts("YES");
  cout << a[1] << ' ' << a[n] << endl;
}
