private const val YES = "Yes"
private const val NO = "No"

fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map{it.toLong()}.sorted()

    if (a.last() - a.first() > 1) {
        println(NO)
    } else if (a.first() == a.last()) {
        println(if (a.first() * 2 <= N || a.first() == N - 1L) YES else NO)
    } else {
        val m = a.indexOfFirst { it == a.last() }.toLong()
        val k = a.last()
        val l = k - m

        if (m > a.first()) {
            println(NO)
        } else if (2 * l > N - m) {
            println(NO)
        } else {
            println(YES)
        }
    }
}
