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