import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000476_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String[] t = br.readLine().split(" "); int n = Integer.parseInt(t[0]); String[] x = br.readLine().split(" "); int sum = 0; for(int i = 0; i < n; i++) sum += Integer.parseInt(x[i]); System.out.println(n * Integer.parseInt(t[1]) == sum ? "YES" : "NO"); } }