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