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