#include <bits/stdc++.h>
using namespace std;
const int maxn = 300010;
int a[maxn];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    if (a[n - 3] + a[n - 2] <= a[n - 1]) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
    printf("%d", a[n - 1]);
    for (int i = n - 3; i >= 0; i--) printf(" %d", a[i]);
    printf(" %d\n", a[n - 2]);
  }
  return 0;
}
