A, B = gets.split.map(&:to_i) if B % A == 0 puts 'YES' else puts 'NO' end