#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
using namespace std;
struct cmp {
  bool operator()(const string &x, const string &y) {
    return (x.size() != y.size()) ? x.size() > y.size() : x > y;
  }
};
bool cmp(const string &x, const string &y) { return x.size() < y.size(); };
int main() {
  int arr[200005], n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  sort(arr, arr + n);
  swap(arr[n - 1], arr[n - 2]);
  for (int i = 1; i < n; i++) {
    if (arr[i - 1] + arr[(i + 1) % n] <= arr[i]) return cout << "NO", 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i) cout << arr[i] << ' ';
  return 0;
}
