#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  swap(arr[n - 1], arr[n - 2]);
  bool flag = true;
  for (int i = n - 1; i > 0; i--) {
    if (arr[i] >= arr[(i + 1) % n] + arr[i - 1]) flag = false;
  }
  if (flag) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
  } else {
    cout << "NO" << endl;
  }
}
