#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 10;
const int INF = 0x3f3f3f;
const int MOD = 1000000007;
int x4[4] = {1, 0, -1, 0};
int y4[4] = {0, 1, 0, 1};
int x8[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int y8[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int n, temp, len;
string str;
long long mod(long long x) { return (x + MOD) % MOD; }
void show(int a) {
  cout << a << " ";
  ;
}
int dp[maxn][maxn];
int main() {
  ios_base::sync_with_stdio(0);
  while (cin >> n) {
    vector<int> arr(n);
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    sort(arr.begin(), arr.end());
    swap(arr[n - 1], arr[n - 2]);
    if (arr[n - 3] + arr[n - 1] > arr[n - 2]) {
      cout << "YES" << endl;
      for (auto x : arr) {
        cout << x << " ";
      }
      cout << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
