import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
    val n = cin.nextInt()
    val a = Array<Int>(n, { cin.nextInt() })

    var t = a[0]
    var less = 0
    var same = 0
    var more = 0
    var ok = true

    for (i in 0..n-1) {
        if (a[i] == t + 1) {
            more += 1
        } else if (a[i] == t - 1) {
            less += 1
        } else if (a[i] == t) {
            same += 1
        } else {
            ok = false
            break
        }
    }

    var major = t
    var key = t
    
    var major_cats = same
    var key_cats = same

    if (more == 0) {
        key = t - 1
        key_cats = less
    } else if (less == 0) {
        major = t + 1
        major_cats = more
    } else {
        ok = false
    }

    if (more == 0 && less == 0) {
        major = t
        key = t        
    } 

    if (major != key) {
        val ex = major - key_cats
        if (0 >= ex || ex*2 > major_cats) {
            ok = false
        }
    } else {
        if (major != n - 1 && major*2 > n) {
            ok = false
        }
    }

    if (ok == false) {
        println("No")
    } else {
        println("Yes")
    }
}