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