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