A, B = gets.split.map(&:to_i) B.upto(A) do |a| next if A % a != 0 next if a % B != 0 puts 'YES' exit end puts 'NO'