import java.io.*; import java.util.*; public class Main_yukicoder476 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); long a = sc.nextInt(); long sum = 0; int[] x = new int[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextInt(); sum += x[i]; } if (a * n == sum) { pr.println("YES"); } else { pr.println("NO"); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }