object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val a, b = List.fill(n)(sc.nextInt()-1)
  val c = Array.fill(n)(0)
  val d = Array.fill(n)(0)
  for (i <- a) {
    c(i) += 1
  }

  for (i <- b) {
    d(i) += 1
  }

  if ((0 until n).exists(i => c(i) + d(i) > n)) {
    println("No")
  } else {
    val cc = c.scanLeft(0)(_+_)
    val cd = d.scanLeft(0)(_+_)
    var m = 0
    for (i <- 1 to n) {
      m = m.max(cc(i) - cd(i-1))
    }
    println("Yes")
    println((b.takeRight(m) ++ b.dropRight(m)).map(_+1).mkString(" "))
  }
}
