#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T > 0) {
    long long arr[100006], n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + n);
    swap(arr[n - 2], arr[n - 1]);
    if (arr[n - 2] < (arr[n - 1] + arr[n - 3])) {
      cout << "YES" << '\n';
      for (int i = 0; i < n; i++) {
        cout << arr[i] << " ";
      }
    } else {
      cout << "NO";
    }
    T--;
  }
}
