#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int t = a[n - 1];
  a[n - 1] = a[n - 2];
  a[n - 2] = t;
  if (a[0] + a[n - 2] <= a[n - 1] || a[n - 1] + a[n - 3] <= a[n - 2]) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
