#include <bits/stdc++.h>
using namespace std;
int ap[200002];
int main() {
  int n, i, a;
  cin >> n;
  int u = n;
  int OK = 1;
  for (i = 1; i <= n; i++) {
    cin >> a;
    ap[a]++;
    if (ap[a] > 2) OK = 0;
    if (ap[a] == 2) {
      u--;
    }
  }
  if (OK == 0)
    cout << "No";
  else {
    cout << "Yes"
         << "\n";
    cout << u << "\n";
    for (i = 0; i <= 200000; i++) {
      if (ap[i] != 0) {
        ap[i]--;
        cout << i << " ";
      }
    }
    cout << "\n";
    cout << n - u << "\n";
    for (i = 200000; i >= 0; i--) {
      if (ap[i] != 0) {
        ap[i]--;
        cout << i << " ";
      }
    }
  }
  return 0;
}
