#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    vector<int> v;
    for (int i = 0; i < n; i++) {
      int r;
      cin >> r;
      v.push_back(r);
    }
    sort(v.begin(), v.end());
    swap(v[n - 1], v[n - 2]);
    if (v[n - 2] < (v[n - 1] + v[n - 3])) {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) cout << v[i] << " ";
      cout << endl;
    } else
      cout << "NO" << endl;
  }
}
