N, A = map(int, raw_input().split()) X = map(int, raw_input().split()) if (sum(X) == N*A): print "YES" else: print "NO"