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