import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); long a = scan.nextLong(); long sum = 0; for(int i = 0; i < n; i++) { sum += scan.nextLong(); } scan.close(); float m = (float)sum / n; if(m == a) { System.out.println("YES"); }else { System.out.println("NO"); } } }