import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int n = sc.nextInt(); final long a = sc.nextLong(); long sum = 0; for(int i = 0; i < n; i++){ sum += sc.nextLong(); } System.out.println(sum == n * a ? "YES" : "NO"); } }