n,a=gets.split.map &:to_i xs=gets.split.map &:to_i puts (xs.reduce(:+) == n*a)?"YES":"NO"