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