object Main {
  def main(args: Array[String]): Unit = {
    val Array(n, m) = io.StdIn.readLine().split(' ').map(_.toInt)
    val q = io.StdIn.readLine().toInt
    val a = io.StdIn.readLine().split(' ').map(_.toInt)

    if (a.last != 1 && a.count(_ == a.last) < n) println("No")
    else println("Yes")
  }
}
