import java.math.*; import java.util.*; import java.io.*; class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; for (int i = 0; i < N; ++i) { a[i] = sc.nextInt(); } if (a[0] > a[N - 1]) { System.out.println("No"); return; } System.out.println("Yes"); PrintWriter pw = new PrintWriter(System.out); for (int i = 1; i <= N; ++i) { if (i != a[0] && i != a[N - 1]) { pw.print(i + " "); } } pw.println(a[0]); pw.close(); } }