#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  unordered_map<int, int> a;
  vector<int> A(n);
  vector<int> inc;
  deque<int> dec;
  for (i = 0; i < n; i++) cin >> A[i];
  sort(A.begin(), A.end());
  bool chk = 1;
  for (i = 0; i < n; i++) {
    if (a.find(A[i]) == a.end()) {
      inc.push_back(A[i]);
      a[A[i]]++;
    } else {
      dec.push_front(A[i]);
      a[A[i]]++;
      if (a[A[i]] > 2) {
        chk = 0;
        break;
      }
    }
  }
  if (!chk)
    cout << "No";
  else {
    cout << "Yes" << endl;
    cout << inc.size() << endl;
    for (i = 0; i < inc.size(); i++) cout << inc[i] << " ";
    cout << endl;
    cout << dec.size() << endl;
    for (i = 0; i < dec.size(); i++) cout << dec[i] << " ";
  }
}
