#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  long long int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int i = n - 1;
  if (arr[i] < arr[0] + arr[n - 2]) {
    cout << "YES\n";
    for (int j = 0; j < n; j++) cout << arr[j] << " ";
    return 0;
  }
  i--;
  int x = arr[n - 1];
  while (i >= 1) {
    if (x < arr[i] + arr[i - 1]) {
      int j = 0;
      cout << "YES\n";
      while (j < n - 1) {
        if (j != i) {
          cout << arr[j] << " ";
          j++;
        } else {
          cout << x << " ";
          i = 0;
        }
      }
      return 0;
    }
    i--;
  }
  cout << "NO";
}
