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