n, m = map(int, input().split()) s = sum(map(int, input().split())) print('YES' if s // n == m and s % n == 0 else 'NO')