n, h = gets.split.map &:to_i a = gets.split.map &:to_i if a.inject { |a, b| a * b % 1000000007 } % h == 0 puts "Yes" else puts "No" end