#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    sort(a + 1, a + 1 + n);
    for (int i = 1; i <= n; i++) {
      if (i == n - 1) {
        printf("NO\n");
        break;
      }
      if (a[i] + a[n - 1] > a[n]) {
        printf("YES\n");
        for (int j = i + 1; j <= n; j++) printf("%d ", a[j]);
        for (int j = i; j >= 1; j--) {
          printf("%d", a[j]);
          printf("%s", j == 1 ? "\n" : " ");
        }
        break;
      }
    }
  }
  return 0;
}
