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