#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int n, a[100009], c[100009], u = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + n);
  if (a[n] >= a[n - 1] + a[n - 2]) {
    cout << "NO";
    return 0;
  }
  int d = n / 2 + n & 1;
  for (int i = 1; i <= n; i += 2) {
    c[u] = a[i];
    a[i] = 0;
    u++;
  }
  for (int i = n; i > 0; --i) {
    if (a[i]) {
      c[u] = a[i];
      u++;
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < u; ++i) {
    printf("%d ", c[i]);
  }
  return 0;
}
