#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, t, c0 = 0, c1 = 0;
  cin >> n;
  long long int arr[n];
  for (long long 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]);
    for (long long int i = 1; i < n - 1; i++) {
      if (arr[i] >= arr[i + 1] + arr[i - 1]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (long long int i = 0; i < n; i++) cout << arr[i] << " ";
  return 0;
}
