#include <bits/stdc++.h>
using namespace std;
long long int hell = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, p = 0, q = 0, sl;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  vector<long long int> v;
  v.push_back(a[n - 2]);
  for (long long int i = 0; i < n; i++) {
    if (i == n - 2) continue;
    v.push_back(a[i]);
  }
  for (long long int i = 0; i < n - 2; i++) {
    if (v[i] + v[i + 2] <= v[i + 1]) p++;
  }
  if (v[0] + v[n - 2] <= v[n - 1] || p != 0) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (long long int i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
  return 0;
}
