#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const int mod = 1000000007;
const int N = 400030;
double eps = 0.01;
double PI = acos(-1.0);
int n;
int a[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + n + 1);
  if (a[n] < a[n - 2] + a[n - 1]) {
    swap(a[n], a[n - 1]);
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    printf("\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
