import java.util.* import java.math.BigInteger fun main(args: Array) { val cin = Scanner(System.`in`) val n = cin.nextBigInteger() val avr = cin.nextBigInteger() var m = BigInteger.ZERO var sum = BigInteger.ZERO while (m < n) { sum += cin.nextBigInteger() m = m + BigInteger.ONE } if ((n * avr) == sum) { println("YES") } else { println("NO") } }