#include <bits/stdc++.h>
using namespace std;
void an() {
  long long n;
  cin >> n;
  vector<long long> a(n), b(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  long long p, q = n - 1;
  for (p = 0; p < n; p += 2) b[p] = (a[p]);
  if ((n - 1) % 2 == 0) q--;
  for (; q >= 0; q -= 2) b[q] = a[q];
  int bb = 1;
  if (a[n - 2] + a[n - 3] <= a[n - 1]) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (long long i = 0; i < n; i++) {
    if (i == n - 2) {
      cout << a[i + 1];
      cout << " ";
    } else if (i == n - 1)
      cout << a[i - 1] << " ";
    else
      cout << a[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int t = 1;
  while (t--) an();
  return 0;
}
