#include <bits/stdc++.h>
using namespace std;
int A[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  sort(A, A + n);
  if (A[n - 3] + A[n - 2] <= A[n - 1]) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 0; i < n - 2; i++) {
      cout << A[i] << " ";
    }
    cout << A[n - 1] << " " << A[n - 2] << endl;
  }
  return 0;
}
