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