#include <bits/stdc++.h>
using namespace std;
void fun(long long arr[], long long n) {
  sort(arr, arr + n);
  long long op[n];
  long long mid = (n - 1) / 2;
  long long j = 1, i = 1;
  op[mid] = arr[0];
  for (i = 1; i <= mid; i++) {
    op[mid + i] = arr[j++];
    op[mid - i] = arr[j++];
  }
  if (n % 2 == 0) op[mid + i] = arr[j];
  for (i = 0; i < n; i++) arr[i] = op[i];
}
signed main() {
  long long n, first, last, left, right, mid;
  cin >> n;
  long long arr[n];
  long long i;
  for (i = 0; i < n; i++) cin >> arr[i];
  fun(arr, n);
  last = arr[n - 1];
  first = arr[0];
  for (i = 0; i < n; i++) {
    mid = arr[i];
    if (i == 0) {
      left = last;
      right = arr[i + 1];
      if (mid >= left + right) {
        cout << "NO" << endl;
        return 0;
      }
      continue;
    }
    if (i == n - 1) {
      left = arr[i - 1];
      right = first;
      if (mid >= left + right) {
        cout << "NO" << endl;
        return 0;
      }
      continue;
    }
    left = arr[i - 1];
    right = arr[i + 1];
    if (mid >= left + right) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) cout << arr[i] << " ";
  return 0;
}
