#include <bits/stdc++.h>
using namespace std;
long long binomialCoeff(long long n, long long k) {
  long long res = 1;
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long M = 1e9 + 7;
long long mods(long long a, long long b) {
  a = a % M;
  b = b % M;
  return (a + b) % M;
}
long long modp(long long a, long long b) {
  a = a % M;
  b = b % M;
  return (a * b) % M;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  long long a = v[n - 1];
  long long b = v[n - 2];
  long long c = v[n - 3];
  if (a < (b + c)) {
    cout << "YES" << endl;
    cout << b << " " << a << " " << c << " ";
    for (int i = 0; i < n - 3; i++) {
      cout << v[i] << " ";
    }
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
}
