n, a =gets.split.map &:to_i x= gets.split.map &:to_i puts (if x.reduce(:+)==a*n then "YES" else "NO" end)