import java.io.PrintWriter; import java.util.*; import java.util.concurrent.SynchronousQueue; 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]; long s = 0; for (int i = 0; i < n; ++i) { x[i] = sc.nextLong(); s += x[i]; } if (a * n == s) { System.out.println("YES"); } else { System.out.println("NO"); } } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }