#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> ve;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    ve.push_back(x);
  }
  sort(ve.begin(), ve.end());
  vector<int> inc, dec;
  inc.push_back(ve[0]);
  bool turn = true;
  for (int i = 1; i < n; i++) {
    if (ve[i] == ve[i - 1]) {
      if (turn)
        dec.push_back(ve[i]);
      else
        inc.push_back(ve[i]);
      turn ^= 1;
    } else {
      inc.push_back(ve[i]);
      turn = true;
    }
  }
  for (int i = 1; i < inc.size(); i++)
    if (inc[i] == inc[i - 1]) return cout << "No\n", 0;
  for (int i = 1; i < dec.size(); i++)
    if (dec[i] == dec[i - 1]) return cout << "No\n", 0;
  reverse(dec.begin(), dec.end());
  cout << "Yes\n";
  cout << inc.size() << "\n";
  for (auto x : inc) cout << x << " ";
  cout << "\n";
  cout << dec.size() << "\n";
  for (auto x : dec) cout << x << " ";
  cout << "\n";
  return 0;
}
