a,b=gets.split.map(&:to_i) 1.upto(100){|value| if a < (b * value) break elsif a % (b * value) == 0 puts "YES" exit end } puts "NO"