#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int a[maxn];
int b[maxn];
int n;
bool check() {
  for (int i = 2; i <= n - 1; i++)
    if (b[i] >= b[i - 1] + b[i + 1]) return false;
  if (b[1] >= b[n] + b[2]) return false;
  if (b[n] >= b[n - 1] + b[1]) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int mid = (1 + n) >> 1;
  int loc = 1;
  b[mid] = a[loc];
  if (n & 1) {
    for (int i = 1; i <= n / 2; i++) {
      b[mid - i] = a[++loc];
      b[mid + i] = a[++loc];
    }
  } else {
    for (int i = 1; i <= n / 2 - 1; i++) {
      b[mid - i] = a[++loc];
      b[mid + i] = a[++loc];
    }
    b[n] = a[++loc];
  }
  if (check()) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d ", b[i]);
  } else
    puts("NO");
  return 0;
}
