#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, x;
  cin >> n;
  vector<long long int> arr;
  for (i = 0; i < n; i++) {
    cin >> x;
    arr.push_back(x);
  }
  sort(arr.begin(), arr.end());
  if (arr[n - 1] >= arr[n - 2] + arr[n - 3])
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    cout << arr[n - 1] << " " << arr[n - 2];
    for (i = 0; i < n - 2; i++) cout << " " << arr[i];
    cout << endl;
  }
  return 0;
}
