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