a, b = gets.chomp.split.map(&:to_i) b.step(a, b) do |i| next if a % i > 0 puts "YES" exit end puts "NO"