#include <bits/stdc++.h>
using namespace std;
auto main() -> int {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n;
  vector<int> vec, res(n);
  for (int i = 0; i < n; ++i) {
    cin >> x;
    vec.push_back(x);
  }
  sort(vec.begin(), vec.end(), greater<int>());
  if (vec[0] >= vec[1] + vec[2])
    cout << "NO";
  else {
    cout << "YES" << '\n';
    int in = n / 2;
    int f = 0;
    int l = n - 1;
    int i = 0;
    while (in--) {
      res[f] = vec[i];
      res[l] = vec[i + 1];
      ++f;
      --l;
      i += 2;
    }
    if (n % 2 != 0) res[f] = vec[i];
    for (auto i : res) cout << i << " ";
  }
}
