import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); int n = Integer.parseInt(inputs[0]); long a = Long.parseLong(inputs[1]); inputs = reader.readLine().split(" "); long sum = 0; for (int i = 0; i < n; i++) { sum += Long.parseLong(inputs[i]); } if((a*n) == sum) { System.out.println("YES"); } else { System.out.println("NO"); } } }