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