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