#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, c = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  if (a[n - 2] + a[0] > a[n - 1]) {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) cout << a[i] << " ";
    return 0;
  } else {
    for (long long i = 0; i < n - 1; i++) {
      if (a[n - i - 2] + a[(n - i) % n] <= a[n - 1 - i]) {
        swap(a[n - i - 1], a[n - 2 - i]);
        c++;
      } else
        break;
    }
  }
  if (c == n - 1)
    cout << "NO";
  else {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) cout << a[i] << " ";
  }
  return 0;
}
