import java.util.* fun main(args: Array) { val cin = Scanner(System.`in`) var N = cin.nextInt() var K = cin.nextLong() val asc = Array(N, { i -> cin.nextLong() }) var sm = 0L for(i in 1..N) sm += asc[i - 1] println(if(sm == K * N) "YES" else "NO") }