import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class _476 { public static void main(String[] args) throws IOException { new _476().solve(); } void solve() throws IOException { try (final Scanner in = new Scanner(System.in)) { int n = in.nextInt(); long a = in.nextLong(); long sum = 0; for (int i = 0; i < n; i++) sum += in.nextLong(); System.out.println(sum == a * n ? "YES" : "NO"); } } // for debug static void dump(Object... o) { System.err.println(Arrays.deepToString(o)); } }