#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  int n, visit[105], m[105], i, j, k, x;
  while (cin >> n) {
    memset(visit, 0, sizeof(visit));
    memset(m, 0, sizeof(m));
    for (i = 0; i < n; i++) {
      cin >> x;
      visit[x]++;
    }
    int ans = 0;
    for (i = 0; i < 105; i++) {
      if (visit[i]) {
        ans++;
      }
    }
    int flag = 0;
    if (ans != 2)
      cout << "NO" << endl;
    else {
      for (i = 0; i < 105 && !flag; i++) {
        if (visit[i] && !flag) {
          if (visit[i] * 2 == n) {
            flag = 1;
          }
        }
      }
      if (!flag) {
        cout << "NO" << endl;
      } else {
        cout << "YES" << endl;
        int temp = 0;
        for (i = 0; i < 105; i++) {
          if (temp && visit[i])
            cout << ' ' << i;
          else if (visit[i] && !temp)
            cout << i, temp++;
        }
        cout << endl;
      }
    }
  }
  return 0;
}
